2016-04-21 61 views
0

我見過這樣的問題,其中大多數都是在將語法更改爲最新的Apache版本或搞亂.htaccess。但不是在我的情況下,因爲我使用新鮮的F23安裝,從來沒有玩過erarlier Apache版本。我正試圖建立一個簡單的虛擬主機,綁定到我的一個IP。以下是我把/etc/httpd/conf.d/internal.conf新鮮fedora上的apache 2.4:AH01630:客戶端被服務器配置拒絕

Listen 10.10.1.177:80 
<VirtualHost 10.10.1.177:80> 
     DocumentRoot "/home/www" 
     DirectoryIndex index.html 
     ServerName internal:80 
     <Directory 「/home/www「> 
       Options All Indexes FollowSymLinks 
       Options +Indexes 
       Require all granted 
     </Directory> 
     LogLevel debug 
     ErrorLogFormat "%{cu}t %M" 
     ErrorLog /var/log/httpd/internal-error.log 
     CustomLog /var/log/httpd/internal-access.log combined 
</VirtualHost> 

當我嘗試:

curl http://10.10.1.17 

從其他主機的網絡中,第403頁出現,重定向到默認的fedora-apache頁面。這個條目進入錯誤日誌:

2016-04-21 22:45:50.610696 AH01626: authorization result of Require all denied: denied 
2016-04-21 22:45:50.610724 AH01626: authorization result of <RequireAny>: denied 
2016-04-21 22:45:50.610729 AH01630: client denied by server configuration: /home/www/ 
2016-04-21 22:45:50.610763 AH01626: authorization result of Require all granted: granted 
2016-04-21 22:45:50.610771 AH01626: authorization result of <RequireAny>: granted 

我只是想讓這個虛擬服務器爲我放到/ home/www的任何東西服務。我錯過了什麼?

我改變了主httpd.conf文件綁定到我的其他網絡接口。 我對所有.conf文件「greped」「deny | denied」語句,並且在主配置中僅找到默認的「require all denied」作爲「/」目錄和.ht文件。

回答

1

有一個LocationMatch指令在/etc/httpd/conf.d/welcome.conf導致此行爲:

<LocationMatch "^/+$"> 
    Options -Indexes 
    ErrorDocument 403 /.noindex.html 
</LocationMatch> 

評論指出,文件的意見(或空出該文件),但 刪除該文件,因爲隨後升級包將返回。它不會被覆蓋,如果你 已經在本地修改它。

+0

嗨,幫了一下。謝謝。但現在我立即看到403頁。而且日誌只包含我在原始帖子中提到的前三個條目。所以stil AH01630的消息。當我將「index.html」附加到我的url時,我得到相同的行爲。 – marcinek

相關問題