WAMP您无权访问此服务器上的/

问题描述:

您无权访问此服务器上的/. 我为我的项目创建了一个新的虚拟主机.现在,我无法访问之前可以访问的所有本地存储项目.但是虚拟主机上的项目可以工作.

You don't have permission to access / on this server. I created a new virtual host for my project. And now I cant access all locally stored projects that I could access earlier. But project on virtual host works.

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

我认为您正在使用Apache 2.4.

I think you are using Apache 2.4.

使用

Require all granted

而不是全部

Order allow,deny Allow from all

Order allow,deny Allow from all

来自所有.conf文件 像这样的例如:-:http.conf,httpd-vhosts.conf,httpd-autoindex.conf.

from your all .conf files for eg-:http.conf, httpd-vhosts.conf, httpd-autoindex.conf like that.

然后重新启动系统.

Regts