Apache2 and virtual hosts

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Jul 17 17:11:34 UTC 2007


Jamon Camisso wrote:
> Madison Kelly wrote:
>> Hi all,
>>
>>   I'm using Debian and Apache2, which uses individual files for 
>> virtual hosts. Currently, if any one of the VH containers are 
>> misconfigured, Apache2 as a whole won't come back up on restart or 
>> will fail on reload.
>>
>>   I am writing a management console for our customers who host with 
>> us, and I would like to allow them to edit their own VH container 
>> file. I worry though that a user will make a mistake and take the 
>> whole web server down.
>>
>>   Is there a way anyone knows up that I can tell Apache to disregard a 
>> misconfigured VH container (possibly send an alert) and continue 
>> loading the rest of the virtual hosts?
> 
> Try apache2ctl -S to at least get an idea if the syntax is correct. If 
> not, maybe a conditional to restore the config(s) from a backed up known 
> working copy?
> 
> How about a gui point and click check/radio box type interface for 
> various options? That way your script controls the input but the user 
> gets to choose their options.
> 
> Jamon

I can certainly try validating the syntax first, but was still hoping to 
set Apache2 to ignore defective VH containers, "just in case". :)

I was thinking about restricting the simple interface options like you 
mentioned, but our clients are, generally speaking, fairly technically 
literate. Certainly any who would want to edit their VH container would 
be. So I want to give them as much flexibility as possible. If I can't 
find a way to adequately guard Apache2 against misconfigurations though, 
I will have to do this.

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list