直接輸入地址顯示
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
就可以了。