HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Split ServerAlias on multiple lines if >8192 bytes (http://www.howtoforge.com/forums/showthread.php?t=36205)

StrikerNL 10th June 2009 09:19

Split ServerAlias on multiple lines if >8192 bytes
 
We have one domain on our ISPConfig 3.0.1.3 (+ubuntu 8.10) server with a 'large' amount of parked domains that are linked to it as an aliasdomain.

There seems to be a problem with the way ISPConfig handles this though. It simply keeps adding the aliasdomains onto the 'ServerAlias' directive. However, as it turns out, such a line, including the directive itself, can only be a maximum of 8192 bytes.

When these 8192 bytes are exceeded, apache simply assumes a new line starts there, and something to this effect happens when starting apache (let's assume www.somedomain.com is the domain on the 8192 byte boundary):

Code:

root@ispconfig:~# /etc/init.d/apache2 start
 * Starting web server apache2
Syntax error on line 12 of /etc/apache2/sites-enabled/parking.ourserver.com.vhost:
Invalid command 'medomain.com', perhaps misspelled or defined by a module not included in the server configuration
                                                                                                                      [fail]

This can easily be solved by checking if such a line exceeds 8192 bytes, and if so, adding an additional ServerAlias directive.

The problem is that when this occurs, the entire apache server fails to start, causing ALL websites on the server to be unreachable.


All times are GMT +2. The time now is 13:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.