WAMP 403 Forbidden message on Windows 7

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

    This configuration in httpd.conf work fine for me.

    <Directory "c:/wamp/www/">
        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1 ::1
    </Directory>
    
    0 讨论(0)
  • 2020-11-27 13:24

    make sure that, the name of the file in the directory c:/wamp/apps/phpmyadmin3.1.3.1/, match the name (or version) in the phpMyAdmin.conf (Alias /phpmyadmin "c:/wamp/apps/phpmyadmin3.1.3.1/" )

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

    Surprisingly, square brackets in DocumentRoot (and related, like <Directory>) paths can also cause error 403:

    • DocumentRoot "P:/TRY/web/fatfree/from_github/fatfree-master[bang]" failed with 403, while
    • DocumentRoot "P:/TRY/web/fatfree/from_github/fatfree-master" worked fine.

    (I didn't bother figuring out the Apache path escaping, if any, just renamed the path instead. If anyone knows, comments are welcome.)

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

    Also on Apache 2,4 you may need to add this to the directory directive in conf, in case you decided to include httpd-vhosts.conf.

    By default you can install wamp in C:\ but still choose to deploy your web development in another location.

    To do this inside the vhosts.conf you can add this directive:

    <Directory "e:/websites">
        Options Indexes FollowSymLinks MultiViews
        DirectoryIndex index.php
        AllowOverride All
      <IfDefine APACHE24>
        Require local
      </IfDefine>
      <IfDefine !APACHE24>
        Order Deny,Allow
        Allow from all
        Allow from localhost ::1 127.0.0.1
      </IfDefine>
    </Directory>
    
    0 讨论(0)
  • 2020-11-27 13:27

    Thanks for your question. I'am using wamp 3 now. And I find an simple answer to do this under your question. But that answer should change a little on wamp 3. The steps are as following:

    1. Right click wamp icon
    2. Choose Wamp Setting
    3. Click the Menu item:online/offline
    4. Left click wamp icon
    5. You will find there is a new item called "Put online"
    0 讨论(0)
  • 2020-11-27 13:27

    Make sure you aren't using a Windows' directory separator character (backslash) in your path names in your .conf file, even if you are on Windows. Apache doesn't understand them but will still start up and then output a 403 Forbidden Message.

    wrong:

    <Directory "c:\websites\my-website\">
    

    right:

    <Directory "c:/websites/my-website/">
    
    0 讨论(0)
提交回复
热议问题