WAMP You don't have permission to access / on this server

ぃ、小莉子 提交于 2019-12-13 02:26:14

问题


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>

hosts:

# 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

回答1:


I think you are using Apache 2.4.

Use

Require all granted

instead of all

Order allow,deny Allow from all

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

Then restart your system.

Regds



来源:https://stackoverflow.com/questions/32797967/wamp-you-dont-have-permission-to-access-on-this-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!