WAMP 403 Forbidden message on Windows 7

后端 未结 26 1507
抹茶落季
抹茶落季 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:14

    I have tried all the stuff except clearing the mess in .htaccess file.

    Go to www/ directory and make a copy of .htaccess file in another folder. Then clear all the lines in .htaccess original file. And add this line,

    RewriteEngine On

    Then restart the server. This has solved my problem and got access to all my localhost sites. Hope it would solve yours too.

    0 讨论(0)
  • 2020-11-27 13:15

    Remember to remove dummy elements in httpd-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@dummy-host2.example.com
        DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
        ServerName dummy-host2.example.com
        ErrorLog "logs/dummy-host2.example.com-error.log"
        CustomLog "logs/dummy-host2.example.com-access.log" common
    </VirtualHost>
    
    0 讨论(0)
  • 2020-11-27 13:16

    It took me forever to figure this out.

    C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

    In this file you will notice several example virtual host files, that look like:

    <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@dummy-host2.example.com
        DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
        ServerName dummy-host2.example.com
        ErrorLog "logs/dummy-host2.example.com-error.log"
        CustomLog "logs/dummy-host2.example.com-access.log" common
    </VirtualHost>
    

    Simply delete these entries and replace with:

    <VirtualHost *:80>
        ServerAdmin serveradmin@host.com
        DocumentRoot "C:\wamp\www"
        ServerName localhost
    </VirtualHost>
    

    You definitely need to make sure your other ducks are in a row but this for me with the solution that worked.

    0 讨论(0)
  • 2020-11-27 13:19

    I found a simpler fix...

    Although the icon was green WAMP still needs to be "Put Online" (last item of menu when left-clicking icon).

    After that I had access as normal.

    0 讨论(0)
  • 2020-11-27 13:19

    For me the inclusion of "Require local" helped to solve Error 403. The alias config file looks like this:

    Alias /mytest/ "C:/mytest/" 
    
    <Directory "C:/mytest/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
        Require local
    </Directory>
    
    0 讨论(0)
  • 2020-11-27 13:19

    My solution was to disable encoding for encoded files (these files are green in windows). Ive got these files from MAC computer and it was encrypted by default.

    Ive select these files > right click > properities > general tab > andvanced > uncheck encrypt files...

    And voila it works.

    0 讨论(0)
提交回复
热议问题