本机内配置域名访问指定目录
1、打开Apache2.2\conf\extra\httpd-vhosts.conf,添加:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:/www/pc/branches/V4.38-dev/"
ServerName www.pc.com
</VirtualHost>
2、打开Apache2.2\conf\httpd.conf,把#Include conf/extra/httpd-vhosts.conf前面的“#”去掉。
把#LoadModule rewrite_module modules/mod_rewrite.so前面的“#”去掉。3、
打开C:\WINDOWS\system32\drivers\etc\host文件,添加
127.0.0.1 你想要用的域名
若
127.0.0.1 localhost
::1 localhost
前有#号,去掉#
4、重启php环境,ok
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:30
阅读量:172
阅读量:184
阅读量:78
阅读量:39