Web Hosting Talk







View Full Version : size of vhosts.conf affect speed?


jdulberg
06-27-2001, 01:30 PM
I was informed by my previous host (Vservers) that it would be a good idea to keep the virtual host configuration file as small as possible in order to keep good performance for all the VH's.

My new host HostPro, has a different opinion - stating that I shouldn't bother keeping the config file as small as possible by taking out redundant commands.

Who should I believe?

Here are the 2 different vhost additions:

Old server:

<VirtualHost domain.com>
ServerName www.domain.com
ServerAlias domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /usr/local/etc/httpd/vhosts/domain.com/htdocs
ScriptAlias /cgi-bin/ /usr/local/etc/httpd/vhosts/domain.com/cgi-bin/
</VirtualHost>


New server:

<VirtualHost domain.com>
DocumentRoot /usr/local/www/vhosts/domain.com/htdocs
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin webmaster@domain.com
LogFormat COMBINED
ErrorLog /usr/local/www/vhosts/domain.com/logs/error_log
TransferLog /usr/local/www/vhosts/domain.com/logs/access_log
HostNameLookups off
<Directory "/usr/local/www/vhosts/domain.com/htdocs">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin /usr/local/www/vhosts/domain.com/cgi-bin
<Directory "/usr/local/www/vhosts/domain.com/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Any suggestions are appreciated. I have 175 virtual hosts and I want to keep them running as smooth as possible.

Thanks.

(SH)Saeed
06-27-2001, 02:16 PM
That file is only read once when Apache is started and should not affect the preformance of the server or websites.

jdulberg
06-27-2001, 02:20 PM
Interesting... wonder why Vservers told me to take out redundant info.

Well, saves me time not having to keep editing the file.

Thanks.

marco
06-28-2001, 01:40 AM
VServers told you to keep that file small because at that time Apache was started for every request to the website and therefore it had to read that file for every visitor (yes, that sounds stupid but it was that way)

When I moved to Hostpro things changed: Apache is now started as usual, and therefore only once at the machine boot or when you decide to run it. Therefore that file is read only once, and not for every request.

Cheers, :)

jdulberg
06-28-2001, 01:53 AM
I figured it had something to do with Vservers. The reason I'm switching to the new HostPro plan 'cuz the Vservers' systems are pretty much being left out to pasture. The apache, php and mysql installs are all super out dated. They've been spending all their time on getting the Freedom systems working. HostPro told me they have another scheduled upgrade for mid August.

Thanks for your input... saves me a bunch of time!