apache 虛擬目錄的配置
阿新 • • 發佈:2018-11-02
文章參考
http://jingyan.baidu.com/article/9113f81b2700852b3214c797.html
http://blog.163.com/[email protected]/blog/static/10856093201332341142841/
修改 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 檔案
新增 D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf 檔案
新增 C:\Windows\System32\drivers\etc\host 檔案內容
如果出現“You don't have permission to access / on this server”,則需要修改 D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 檔案
http://jingyan.baidu.com/article/9113f81b2700852b3214c797.html
http://blog.163.com/[email protected]/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>