Jump to content

make httpd.conf dinamycally load the allow rules


sebastianvasile

Recommended Posts

Hi everyone,

This is my first post here, so I say hello in the same time :).

 

I have multiple apache servers, running on different machines. The applications are usually limited to well defined sets of ip''s. The problem

is that if there are new ip's coming I have to grant them all everywhere, or remove them as well.

I was wondering if there is a way to tell apache to load for some virtual hosts, the "allow" ip rules from an external file, so that I can modify only once and the modification will replicate between servers (let's say with sh scripts runned by cron).

 

I would like to avoid the use of sh scripts on each server, that will edit the httpd.conf themselves and restart apache as well, I think this might be dangerous, as it might introduce a point of failure and downtime. I don't feel confortable with the ideea of dynamically restarting the apache server.

 

Any suggestions on this issue? Anyone who did something similar? I'm quite new into administration, so there might be a tool/module that does this and I was unable to find.

 

thanks for your input.

Link to comment
Share on other sites

You can use the Include directive to load configurations from external files but it is only available from within your main httpd.conf file. Also, any changes will need a restart to take affect.

 

The only thing I could suggest (where you wont need to restart) is to dynamically alter each virtual hosts .htaccess file. This could be quite easilly achived via Bash / Sed.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.