ippy98
January 23, 2010, 1:29pm
1
I have a directory that I want to just list the items when going to the URL instead of having an index.html page in the folder. I keep getting a 403 forbidden even though it is in my document root.
I tried to add:
Alias /keys/ "/var/www/html/keys/"
<Directory "/var/www/html/keys">
Options Indexes MultiViews FollowSymLinks
Order allow,deny
Allow from all
</Directory>
but its still not working
what am i missing?
pludi
January 23, 2010, 1:32pm
2
The 2 obvious questions first:
Did you reload the apache configuration after you changed it?
Does the user apache is running as have access to the directory you specified?
ippy98
January 23, 2010, 1:37pm
3
yes and yes
I can get to all other directories and files on my server, just not this one, and the permissions are the same
/var/www/html> ls -lA
drwxr-xr-x 9 root root 4096 2010-01-23 12:03 keys
drwxr-xr-x 2 root root 4096 2009-11-10 19:47 resume
document root above.
resume folder works
keys gets 403
Scott
January 23, 2010, 2:04pm
4
Hi.
I can't recreate your issue.
Is there perhaps a .htaccess file in the keys directory, which is not readable?
ippy98
January 23, 2010, 2:05pm
5
Hi.
I can't recreate your issue.
Is there perhaps a .htaccess file in the keys directory, which is not readable?
no just the directories of what i want displayed
Scott
January 23, 2010, 2:08pm
6
That's odd.
I created a .htaccess file with rubbish, and got an internal server error.
Then I chmod'd the file to 400 and got forbidden, then deleted it and still got forbidden.
After restarting the webserver, it works OK again.
What does the error_log say?
ippy98
January 23, 2010, 3:24pm
7
fixed
I had to comment out a line in:
modsecurity.d/modsecurity_crs_50_outbound.conf
52 # Directory Listing
53 #SecRule RESPONSE_BODY "(?:<(?:TITLE>Index of.*?<H|title>Index of.*?<h)1>Index of|>\[To Parent Directory\]<\/[Aa]><br>)" \
54 # "phase:4,t:none,ctl:auditLogParts=+E,deny,log,auditlog,status:403,msg:'Directory Listing',id:'970013',tag:'LEAKAGE/INFO',severity:'4'"
55