技術(shù)員聯(lián)盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機(jī)純凈版,64位旗艦版,綠色軟件,免費(fèi)軟件下載基地!

當(dāng)前位置:主頁 > 教程 > 服務(wù)器類 >

apache下403 Forbidden錯(cuò)誤問題解決方法

來源:技術(shù)員聯(lián)盟┆發(fā)布時(shí)間:2018-05-28 18:20┆點(diǎn)擊:

  直接輸入地址顯示

  Forbidden

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

  httpd.conf,找到這么一段:

 代碼如下      

<Directory />
     Options FollowSymLinks
     AllowOverride None
     Order deny,allow
     deny from all
     Satisfy all
</Directory>

然后試著把deny

 

  from all中的deny改成了allow,保存后重起了apache,然后再一測試我的網(wǎng)頁,哈哈

  ps 403禁止訪問 主要民apache中的 Order deny,allow deny影響到了,我們要解決它只需要把deny改成了allow就可以了,當(dāng)然還有問題就是服務(wù)器權(quán)限問題。

  確保web文件夾下有index.html文件(或名為index而后綴為其他形式(如.jsp .php等)的文件) ,因?yàn)锳pache默認(rèn)以index.html為網(wǎng)站首頁,如果沒有這個(gè)文件就會(huì)出現(xiàn)上面的403錯(cuò)誤。

 代碼如下      

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

 

  改為(如你想用index.jsp):

 代碼如下      

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

 

  如果需要瀏覽該文件夾下的內(nèi)容,可以在前添加:

 代碼如下      

Options Indexes

 

  就可以了。