Forum Moderators: bakedjake
[mathcs.richmond.edu...]
The situation is multiple virtual hosts and I want a global declaration to allow access to the htaccess files for the client, but still restrict from world access.
The challenge is some ftp programs do not show htaccess files and some do. For those that do not, I can only guess it is using http protocol to connect and therefore the global declaration in the httpsd.conf for Apache is what is hiding the files.
Something like this:
SetEnvIf Remote_User /??what to match??/ valid_user
<Files .htaccess>
Order allow,deny
Deny from all env=!valid_user
</Files>
How can I get the enviroment to contain 'valid_user' if the logged in user is equal to the UID(owner) of the file.
Its not that big of a deal, but I would like to know how others solved this.
If you want to just block access to it from the web then you could just put this in your httpd.conf file:
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>