phpstudy搭建本地域名

2017-12-11  本文已影响0人  Yoyo_UoU
<VirtualHost *:81>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "E:/ys/phpstudy/WWW/项目根目录"
    ServerName 你的域名
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

需要注意的是:conf文件下面也有一个vhosts.conf,但根据httpd.conf里面修改的目录是

image.png
extra目录下面的httpd-vhosts.conf,自己就犯了这个错

配置错误常见问题

  1. 很多人在取消 Include conf/extra/httpd-vhosts.conf 这条注释之后阿帕奇就停止工作了,原因很多,你可以根据错误报告来查询。

  1. 在httpd.conf里查找 DocumentRoot


    image.png

    按照上图对比修改

在文件上做了修改都要重启phpstudy

上一篇 下一篇

猜你喜欢

热点阅读