apache 虚拟目录的配置

文章参考
http://jingyan.baidu.com/article/9113f81b2700852b3214c797.html
http://blog.163.com/huangcheng13@126/blog/static/10856093201332341142841/

修改 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 文件
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

添加 D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf 文件
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "F:\git\HMS"
    ServerName www.hms.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

添加 C:\Windows\System32\drivers\etc\host 文件内容
127.0.0.1	www.hms.com

如果出现“You don't have permission to access / on this server”,则需要修改 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 文件
<Directory />
	Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>


猜你喜欢

转载自blog.csdn.net/hbiao68/article/details/53112598
今日推荐