Mobile app version of vmapp.org
Login or Join
Heady270

: Apache - directory browsing gives 404 With no .htaccess files and Options FollowSymLinks MultiViews Indexes followed by AllowOverride None in the vhost configuration, I'm getting 404 responses

@Heady270

Posted in: #Apache #DirectoryListing

With no .htaccess files and Options FollowSymLinks MultiViews Indexes followed by AllowOverride None in the vhost configuration, I'm getting 404 responses from directory listings. Are there some specific modules I need for directory listings?

My active modules are:


authz_host
deflate
dir
env
expires
headers
mime
mod-security
negotiation
php5
reqtimeout
rewrite
setenvif
ssl
unique_id


VHost Configuration:

<VirtualHost *:443>
# SSL
SSLEngine On
SSLCertificateKeyFile /dir/ssl/ssl.key
SSLCertificateFile /dir/ssl/ssl.crt
SSLSessionCacheTimeout 300
</VirtualHost>

<VirtualHost *:80 *:443>
ServerAdmin webmaster@localhost
ServerAlias domain.tld *.domain.tld
ServerName cl.domain.tld

# Just a few connection resets so that I don't waste my bandwidth on "hackers"
SecRuleEngine On
SecRule &REQUEST_HEADERS:User-Agent "@eq 0" drop,phase:1
SecRule REQUEST_HEADERS:User-Agent "^$" drop,phase:1

SecRule REQUEST_LINE "://" drop,phase:1

SecRule REQUEST_URI "^/admin" drop,phase:1
SecRule REQUEST_URI "^/mail" drop,phase:1
SecRule REQUEST_URI "^/webmail" drop,phase:1
SecRule REQUEST_URI \ drop,phase:1

SecRule REQUEST_METHOD !^GET$ chain,drop,phase:1
SecRule REQUEST_METHOD !^HEAD$ chain
SecRule REQUEST_METHOD !^POST$
<Directory /dir/public_html/>
Options FollowSymLinks MultiViews Indexes
Order allow,deny
allow from all
</Directory>

DocumentRoot /dir/public_html
</VirtualHost>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Becky754

Try using this under <Directory>

AllowOverride All

And make sure there isn't a .htaccess file that disables directory browsing in the directory that you're making the request to (and restart Apache).

Update:

Make sure that the mod_autoindex module is loaded along with the mod_dir module. Without the former, you'll get an error when browsing directories. See this:
Apache Module mod_autoindex

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme