您好我在通過瀏覽器訪問我的現場網站時遇到了403錯誤。昨天工作正常。我不確定爲什麼會出現這個錯誤。我已經搜尋了很多關於它。這是我已經嘗試瞭解決方案:通過瀏覽器訪問站點時出現403(訪問被禁止)錯誤
我已經改變了我的httpd.conf文件的配置從默認到:
<Directory /> #Options FollowSymLinks Options Indexes FollowSymLinks Includes AllowOverride All Order deny,allow Allow from all </Directory>
更改權限從默認
/var/www/html
目錄777
和更少的東西。但沒有任何工作。我不確定發生了什麼問題。
我的服務器配置是:
Apache/2.2.29。 AWS EC2實例。
這是在瀏覽器中顯示錯誤消息:
禁止
You don't have permission to access/on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
這是error_logs
錯誤消息:
[Thu May 21 14:58:51 2015] [error] [client XXX.XXX.XXX.XXX] Directory index forbidden by Options directive: /var/www/
[Thu May 21 14:58:51 2015] [error] [client XXX.XXX.XXX.XXX] File does not exist: /var/www/error/noindex.html
請讓我知道在評論,如果你需要什麼其他。感謝提前:)
您的DocumentRoot目錄中是否有index.html文件?顯示您的虛擬主機配置。 – umka
不,沒有/ var/www上的index.html(這是我在httpd.conf文件中設置爲DocumentRoot的內容)。我還沒有使用任何虛擬主機。 –
基本上它應該顯示默認的apache頁面,但它給出了上述錯誤。 –