Apache: You don't have permission to access / on this server,apachepermission

來源:互聯網
上載者:User

Apache: You don't have permission to access / on this server,apachepermission
三. 常見問題常見解決方案

 當在瀏覽器中查看配置成功與否出現問題時,可優先到Apache官方網站的FAQ 上或用搜尋引擎搜尋你的問題。

  我這裡就最常見403問題:

Forbidden

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

提供幾種常見的解決方案:

  1.按上面的配置正確,特別是:

      Order allow,deny
       Allow from all

  2. 確保youRoot檔案夾下有index.html檔案(或名為index而尾碼為其他形式(如.jsp .php等)的檔案) ,因為Apache預設以index.html為網站首頁,如果沒有這個檔案就會出現上面的403錯誤。

  註:如果你想以其他形式的檔案(如:index.jsp或index.php等)作為出現的網頁,可將Apache的設定檔中的:

   <IfModule dir_module>
       DirectoryIndex index.html
   </IfModule>
   改為(如你想用index.jsp):

   <IfModule dir_module>
       DirectoryIndex index.html index.jsp
   </IfModule>

   如果需要瀏覽該檔案夾下的內容,可以在</Directory>前添加:

    Options Indexes

  就可以了。
  3. 針對linux使用者,windows或其他使用者一般沒這種情況。linux系統中一般會內建apache,在修改了設定檔後,最好到安裝Apache的目錄下重啟Apache。


linux apache Forbidden You don't have permission to access / on this server

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

你沒有許可權訪問 /目錄

/etc/httpd/httpd.conf檔案配置
<Directory />
AllowOverride None
Order allow,deny
#allow from all --------------》這行被注釋 這行是意思是 允許所有訪問
</Directory>

root主目錄預設是(按照你的)
/home//lamp/apache243/htdocs
 
apache 的配置問題You don't have permission to access / on this server

indexes 參數是指沒有預設文件(通常為index.php index.html 這些)時列出檔案清單。沒有就不給列出,給出你看到的提示。

在httpd.conf 中可以指定預設文件。
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.