WAMP 403 Forbidden message on Windows 7

后端 未结 26 1676
抹茶落季
抹茶落季 2020-11-27 12:51

I have installed WAMP version 2.1 on my windows 7 machine. When i browse to localhost in my browser, the WAMP server page is visible.

But when I browse to my IP in m

26条回答
  •  悲&欢浪女
    2020-11-27 13:20

    The solution for changing the permissions in the httpd.conf will work if you are OK with providing access to the WAMP server from outside.

    If you do not want to do that then all you have to do is tell windows that the "localhost" domain points to 127.0.0.1. You can do that by editing the hosts file in your system directory.

    The file is placed at : C:\Windows\System32\drivers\etc\hosts

    by default windows 7 ships with :

    # localhost name resolution is handled within DNS itself.
    #   127.0.0.1       localhost
    #   ::1             localhost
    

    You have to un-comment the mapping for localhost:

    # localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
    #   ::1         localhost
    

    Note: you will not be able to edit the hosts file as its a read-only file. To edit, you have to be the administrator, copy the file to some other location, edit it and then copy it back to the etc directory.

    I do not recommend the change of the hosts file. Use the permissions of httpd.conf file. use the hosts file approach only if you do not want the server accessed from outside.

提交回复
热议问题