MAMP "403 Forbidden You don't have permission to access / on this server."

來源:互聯網
上載者:User

標籤:檔案   ica   this   ide   rri   log   family   rect   ati   

 2015年01月22日 17:27:31閱讀數:3488

    用MAMP搭建本機伺服器的時候,設定好ip和連接埠等屬性之後,瀏覽器訪問,報 403錯誤:

 Forbidden  

You don‘t have permission to access / on this server.

google之後,stackoverflow已有類似的問題:http://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access-on-this-server

主要有以下方法是:

將 /Application/MAMP /conf/ apache/httpd.conf  中的如下部分


<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>
set the options to : Options Indexes FollowSymLinks Includes ExecCGI


改成:

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

 

也有人提出是存取權限的問題,就是進程的擁有者沒有訪問Document root的許可權,原話如下:

Also, one should check the folder‘s permissions so that the Apache process‘ owner has permissions to read/execute the specified path for the virtual host. On Windows this could rarely be a problem but on Linux it can be a more frequent cause of 403.

 

看到這我才想到原來我將Document root 設在了案頭。而我直接存取Document root,就報錯了。如果訪問目錄下的某個檔案就沒問題。

 

MAMP "403 Forbidden You don't have permission to access / on this server."

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.