Apache mod_setenvif Server_Addr

Posted on

Apache mod_setenvif Server_Addr – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, , , , .

I have an Apache server in a DMZ, reachaable on the LAN from, public 123.456.789.123. I’m trying to get it to require authentication if the inbound hits are coming from the public side. This doesn’t seem to work:

SetEnvIf SERVER_ADDR 123.456.789.123 local_nic=1

<Location /junk>
  Order Deny,Allow
  AuthName "Access required"
  AuthType Basic
  AuthUserFile /etc/httpd/conf/htpasswd
  Require valid-user

What am I doing wrong?

Sorry, HTML tags were wiping out my Apache directives.

Solution :

Never mind – I found an easier way: require auth, allow 10.x.x.x, and Satisfy Any. That lets people on the LAN get in without passwords, and people on the WAN to require passwords.

Leave a Reply

Your email address will not be published. Required fields are marked *