0

I am running REHL 6.7 with the stock Apache httpd-2.2.

I have enabled mod_status at the Location /server-status. I would like to allow access to this single Location in the following way:

  1. Deny from all
  2. Allow from within my servers subnet with IP range unknown and deny all not within my subnet

This is what my rule currently looks like for the location I want to allow access to within my subnet only (Currently it is denying all even within subnet since that how the rule is currently written).

<Directory "/var/www/html/example">
    Order allow,deny
    Deny from all
    AllowOverride None 
</Directory>
jgr208
  • 111
  • 8

1 Answers1

0

Apache doesn't have a 'local subnet' feature. You might look at something like Chef or Puppet to manage this config file for you and make the necessary changes.

Jason Martin
  • 4,865
  • 15
  • 24
  • Can't do that, apache is the only server that is approved for use on the system, so sounds like will have to add to instructions to customer to find the ip addresses in their subnet – jgr208 Mar 24 '16 at 16:24
  • 2
    Then you could probably write a template configuration file and hook in to the apache startup script to 'sed' in the correct subnet before launching Apache. – Jason Martin Mar 24 '16 at 16:41