質問

I've just installed Wamp and I'm getting 403 access denied error when I try to access http://localhost.
I've checked my apache configuration file and it has the line Allow from 127.0.0.1 in both <Directory /> and <Directory "c:/wamp/www/"> sections.
So why the access to root directory is forbidden for localhost?!

役に立ちましたか?

解決

Depending on the OS, Apache may be binding to IPv6 address, so the localhost is recognizing as ::1 instead of 127.0.0.1.
You have to add Allow from ::1 instead of Allow from 127.0.0.1 in apache config file.
NOTE: Problem can be solved also if you add Allow from all to root directory section in http config file, but it's not a good idea because this way your web root became accessible from any computer in the network you are.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top