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>

1 Answer 1

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.

2
  • 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, 2016 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. Mar 24, 2016 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .