我正在try 使用IP地址从同一网络中的另一台电脑访问我的Laravel应用程序,但通过访问浏览器中的192.168.1.101:8000,我无法让它工作.
我该怎么办?
我正在try 使用IP地址从同一网络中的另一台电脑访问我的Laravel应用程序,但通过访问浏览器中的192.168.1.101:8000,我无法让它工作.
我该怎么办?
你为什么不用拉维尔的 artisan 呢?非常简单:
sudo php artisan serve --host 192.168.1.101 --port 80
Now from other computers, you can type: http://192.168.1.101
Do not forget to replace the IP with your own local one. That's it.
Note: The sudo
is only needed if you wanna serve on port 80.