Sangoku Sangoku - 1 year ago 120
Apache Configuration Question

Apache Proxy balancer overuling file access limits

I have 1 load balancer server and 2 app servers which do load distribution. Now i have a strange problem that the

<Files ~ "^\.ht">
Order allow,deny
Deny from all

rule dous not get triggerd when the request gets forwarded to the app servers.

Setup is:

<Proxy balancer://catdefault>

And in the virtual host i get it included like this:

ProxyPass / balancer://catdefault/
ProxyPassReverse / balancer://catdefault/

The strange thing is that when i apply the Files rule in the app server which is a balance memger ex. then the rule gets respected.

Now we agreed not to makie rew rulles on the app server because they will be later or many of them and administration will be heavy.

Any idea how i can make the files work from the load balancer server and not the servers???

Answer Source

<Directory> or <Files> directives will only apply to objects that reside in the filesystem. Perhaps something like this can help (untested):

ProxyPassMatch "(?i)\.ht([^/]*)$" ! 
ProxyPass / balancer://catdefault/
ProxyPassReverse / balancer://catdefault/
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download