简体   繁体   中英

apache 2.4 on fresh fedora: AH01630: client denied by server configuration

I've seen hudreds of questions like this and most of them end up in changing the syntax to latest Apache version or messing up with .htaccess. But not in my case since I used fresh F23 install and never played with erarlier Apache versions. I'm trying to set up a simple virtual host that binds to one of my IP's. Here is what I put in /etc/httpd/conf.d/internal.conf

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>

When I try:

curl http://10.10.1.17

From other host in that network, first 403 page appears and get redirected to default fedora-apache page. This entries entries gets into error log:

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

I just want this virtual server to serve anything that I put to /home/www. What am I missing?

I changed main httpd.conf file to bind to my other network interface. I have "greped" all .conf files for "deny|denied" statements and found only default "Require all denied" for "/" directory and .ht files in main config.

There is a LocationMatch directive in /etc/httpd/conf.d/welcome.conf that is causing this behavior:

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

Comment out the comments of that file (or empty out that file), but do not remove that file, because a subsequent upgrade of the httpd package will then bring it back. It will not be overwritten if you have modified it locally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM