FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian ISP

 
 
LinkBack Thread Tools
 
Old 01-19-2010, 08:59 AM
Marek Podmaka
 
Default Reducing apache2 config files.

Hello,

Tuesday, January 19, 2010, 10:47:41, Marc Aymerich wrote:

> Hi all!
> In my ISP we have hundreds of virtual hosts like this:

I am using the same for several years, also few hundred domains per
server. All vhosts of one domain are in one config file. I don't see
any performance penalty and it has ability to slightly customize
vhosts for some customers if needed. Files are generated by a script
once per 15 minutes and apache is reload if something have been
changed.
I've just had small issues on older debians that while upgrading
syntax check of all files took about 5 minutes during which apache was
down. But I don't see it anymore with etch nor lenny.



--
bYE, Marki


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2010, 09:54 AM
Henrik Heil
 
Default Reducing apache2 config files.

Hello Marc,

Marc Aymerich wrote:
> Hi all!
> In my ISP we have hundreds of virtual hosts like this:

I have no experience with a number like that -- our vhosts per server
are in the tens.

> <VirtualHost 2.2.2.2:80>
> DocumentRoot /home/pangea/user1/public_html
> ServerName domain1.org
> ServerAlias www.domain1.org www.domain2.org domain2.org
> CustomLog /var/log/apache2/virtual/domain1.org common
> SuexecUserGroup user1 group1
> Action php-fcgi /fcgi-bin/php-fcgi-wrapper
> Alias /fcgi-bin/ /home/httpd/fcgi-bin.d/php5-user1/
> ScriptAlias /cgi-bin/ /home/pangea/user1/cgi-bin/
> </VirtualHost>

If the requirements can differ slightly from vhost to vhost you might
also have a look at mod_macro.

It is flexible an works reliable.

The downside compared to a solution that generates a file is that I
don't know of a way to view the configuration with expanded macros
which makes debugging the macros hard.

The downside compared to mod_vhost_alias and mod_rewrite is that you
have to add a configuration line for every vhost -- but for your
example this could be one line.

Regards,
Henrik


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2010, 02:02 PM
Thomas Goirand
 
Default Reducing apache2 config files.

Marek Podmaka wrote:
> I am using the same for several years, also few hundred domains per
> server. All vhosts of one domain are in one config file. I don't see
> any performance penalty and it has ability to slightly customize
> vhosts for some customers if needed. Files are generated by a script
> once per 15 minutes and apache is reload if something have been
> changed.

I second this. We have some servers with hundreds of vhosts (close to
1000 in fact), and there's no issue. The only thing is that you have to add:

export APACHE_ULIMIT_MAX_FILES="ulimit -n 8192"

in /etc/apache2/envvars, and that apache is testing for all folders
existence before starting which can be slow. I'd like to remove that
feature, as this is as well the reason why apache fails to start
sometimes (we run a script to mkdir -p all folders before restarting
after the sunday's logrotate, but it's not best option, IMHO).

Another thing that I have notice when we were using sarge, is that each
new vhost will "consume" about 1MB of RAM. I'm not sure what is the
current situation, but it's anyway not really an issue when you can run
servers with dozens of GB.

Thomas


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org