【问题标题】:Access Laravel localhost site in network pc without running artisan serve在网络 PC 中访问 Laravel localhost 站点而不运行 artisan serve
【发布时间】:2019-12-15 18:22:26
【问题描述】:

我在服务器 pc 上有一个 laravel 项目,我想使用连接在同一网络上的其他 pc 访问它,而不在服务器 pc 上运行 php artisan serve。

我尝试使用虚拟主机,它在服务器 pc 上工作,但在网络上的其他 pc 上得到这个错误页面 laravelproject.test 的服务器 IP 地址找不到。

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "D:\xampp\htdocs\247_timesheet\public"
    ServerName timesheet.test
    ErrorLog "logs/timesheet.test-error.log"
    CustomLog "logs/timesheet.test-access.log" common
</VirtualHost>

主机文件

127.0.0.1 timesheet.test

【问题讨论】:

    标签: laravel xampp


    【解决方案1】:

    您是否尝试使用服务器的 IP 地址进行连接?

    【讨论】:

    • 是的,这种方式是可能的
    猜你喜欢
    • 2016-07-25
    • 2017-08-02
    • 2018-04-26
    • 2020-01-09
    • 1970-01-01
    • 2015-12-27
    • 2018-02-22
    • 1970-01-01
    • 2020-05-29
    相关资源
    最近更新 更多