先在apache中的 httpd.conf中将 Allow from 127.0.0.1 修改为Allow from all 如果你的是Allow from all的话就不需要改 然后再将

DocumentRoot "D:\web\phpstudy\WWW" 这的文件路径换成PHP项目的路径。修改完成后也就是我这个样子。下图:

局域网访问PHP项目网站 用IP地址进入

然后在 vhosts.conf 配置成 我这个样子的 如下图:

局域网访问PHP项目网站 用IP地址进入

<VirtualHost 172.30.111.249>
        DirectoryIndex  index.html index.php
        ServerName  "172.30.111.249"
        DocumentRoot  "D:\logispackage\web\zczy"
</VirtualHost>

配置基本完成,还有最重要的一点就是重启apache服务,要不就白忙乎了。局域网访问PHP项目网站 用IP地址进入

重启apache后 在网址上输入你的局域网IP地址 如:172.30.111.249 就可以正常的使用了。

 

相关文章:

  • 2021-11-30
  • 2021-11-10
  • 2021-05-23
  • 2021-11-30
  • 2021-12-11
  • 2021-10-10
  • 2021-07-22
猜你喜欢
  • 2021-12-24
  • 2022-01-13
  • 2021-04-16
  • 2022-01-09
  • 2022-01-02
  • 2021-05-18
  • 2021-09-27
相关资源
相似解决方案