在phpStudy怎么配置虚拟地址

C:\phpStudy\Apache\conf httpd.conf中Include conf/extra/httpd-vhosts.conf去掉注释
进入C:\phpStudy\Apache\conf\extra 中httpd-vhosts.conf中配置网址
例子:
<VirtualHost *:80>
DocumentRoot "D:\WWW\ajax"
ServerName www.ajax.com
</VirtualHost>
最后
C:\Windows\System32\drivers\etc\hosts (配置网址)
127.0.0.1 www.ajax.com
重启服务器

C:\phpStudy\Apache\conf httpd.conf(解决网址无法访问)
例子

C:\phpStudy\Apache\conf httpd.conf文件中Include conf/extra/httpd-vhosts.conf注释加上
C:\phpStudy\Apache\conf\extra中httpd-vhosts.conf全部注释

posted @ 2017-09-05 14:09  生命不止追求不断  阅读(191)  评论(0编辑  收藏  举报