在没有 运行 artisan serve 的情况下访问网络 pc 中的 Laravel localhost 站点
Access Laravel localhost site in network pc without running artisan serve
我在服务器 pc 上有一个 laravel 项目,我想使用连接在同一网络上的其他 pc 访问它,而没有 运行 php artisan serve in服务器电脑。
我尝试使用 virtualhost,它在服务器 pc 上工作,但在网络上的其他 pc 上收到此错误页面 laravelproject.test 找不到服务器 IP 地址。
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\xampp\htdocs7_timesheet\public"
ServerName timesheet.test
ErrorLog "logs/timesheet.test-error.log"
CustomLog "logs/timesheet.test-access.log" common
</VirtualHost>
主机文件
127.0.0.1timesheet.test
您是否尝试过使用服务器的 IP 地址进行连接?
我在服务器 pc 上有一个 laravel 项目,我想使用连接在同一网络上的其他 pc 访问它,而没有 运行 php artisan serve in服务器电脑。
我尝试使用 virtualhost,它在服务器 pc 上工作,但在网络上的其他 pc 上收到此错误页面 laravelproject.test 找不到服务器 IP 地址。
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\xampp\htdocs7_timesheet\public"
ServerName timesheet.test
ErrorLog "logs/timesheet.test-error.log"
CustomLog "logs/timesheet.test-access.log" common
</VirtualHost>
主机文件
127.0.0.1timesheet.test
您是否尝试过使用服务器的 IP 地址进行连接?