Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
.htaccess vrs <Directory>
In my Apache httpd.conf file I see this by default:
# forbid access to the entire filesystem by default
Deny from all
# use .htaccess files for overriding,
# and never show them
<Files ~ "^\.ht">
Deny from all
Which is a great security measure BUT I am not sure what is the best way to override this (for my public html dir), without killing the initial intended functionality of protecting the rest of my file system.
In the Apache docs I see two options:
2) Or creating a <Directory> entry in my httpd.conf
I do nothing special, and yet I get a 403 while trying to access .htaccess from 127.0.0.1 .
It will override - locally - settings for higher directory. And what do you understand under 'safe'? To have httpd entirely safe you need to shut it down... I guess it doesn't give .ht* files to anyone by default. But it will give HTML pages. It will also give results of running cgi scripts, but - if handlers are properly configured - not scripts themselves.
Apache only recommend using htaccess where you can't give access to the config file - for example, an ISP hosting sites will give clients htaccess abilities because you obviously can't let them edit httpd.conf