比如你想建立的路径是 mysite.local, 你的工作目录是: C:/mysite
1) httpd-vhosts.conf, 增加代码
DocumentRoot C:/mysite
ServerName mysite.local
2)hosts文件,增加:
127.0.0.1 mysite.local
3) 特别注意,如果想要vhost文件生效,必须确认在httpd.conf 文件中,将
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf的注释去掉
阅读(116) | 评论(0) | 转发(0) |