Updating Cpanel Apache Configurations.

December 22nd, 2009 by keith Leave a reply »

Nothing more than a “make sure you do this”, not really a knowledge base. It’s come to my attention that when people make changes to the httpd.conf on a server that is running Cpanel, that they don’t update the distiller file. So when they recompile apache, they lose any changes they made. Please be sure when you manually update httpd.conf that you save the changes to the distiller file by running the following;

/usr/local/cpanel/bin/apache_conf_distiller --update --main
*make sure if you copy and paste the command that it doesn’t replace the “-” with a “.”

Make sure that you modify the proper files when making the changes. For example to modify the number of servers that the Apache process can run, you will need to modify  /usr/local/apache/conf/extra/httpd-mpm.conf .

 StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0

 

If you need to modify the Time out settings, yo will need to modify the /usr/local/apache/conf/extra/httpd-default.conf .

# Timeout: The number of seconds before receives and sends time out.
#
Timeout 150

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off 

 

 

 

It will confirm that the changes were saved and this will save the changes to the main distiller config, saving them for all apache compiles.

You can test this by running the following to reload the httpd.conf and confirm the change;

/scripts/rebuildhttpdconf

Advertisement

Leave a Reply