【发布时间】:2015-12-24 05:14:00
【问题描述】:
您无权访问此服务器上的 /。 我为我的项目创建了一个新的虚拟主机。现在我无法访问之前可以访问的所有本地存储项目。但是虚拟主机上的项目有效。
http-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@my_poject.com
DocumentRoot "c:\wampF\www\my_project\web"
ServerName my_poject.com
ErrorLog "logs/my_poject.com-error.log"
CustomLog "logs/my_poject.com-access.log" common
</VirtualHost>
主持人:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 my_poject.com
【问题讨论】:
-
看看这篇文章,它将向您展示如何正确创建虚拟主机stackoverflow.com/questions/23665064/…
标签: php apache wamp wampserver