Apache FAQ
How do I remove Tomcat?
Execute the following commands:
- cd /usr/sbin/stoptomcat
- rm -f /usr/sbin/starttomcat
- rm -f /usr/sbin/startomcat
- rm -f /usr/sbin/stoptomcat
Important: Remove all mod_jk lines from httpd.conf, including addmodule, loadmodule, and include line.
How can I configure Apache to serve Java Servlet and Java Server pages?
You can use either the Tomcat or
mod_resin addon to serve Java Servlet and Java Server pages with Apache.
These can be enabled in WHM >> cPanel >> Addon Modules
More information about Tomcat can be found at:
http://tomcat.apache.org
I get an error about HttpdConf.pm when trying to accomplish a task related to Apache.
You'll most likely have to reinstall the HttpdConf.pm module. You can do so with the following command:
wget http://httpupdate.cpanel.net/cpanelsync/easyapache/Cpanel/EasyApache/HttpdConf.pm -O /usr/local/cpanel/Cpanel/EasyApache/HttpdConf.pm
Then, you'll need to retry the task you were attempting to accomplish (recompiling Apache, updating Apache modules, rebuilding
httpd.conf, etc).
What is this page about cPanel and Apache that I see at my domain?
This is a placeholder page for Apache. You'll need to contact your web host so they can ensure that your VirtualHost is properly configured in Apache's configuration file.
Apache is restarting every 10 minutes. What's wrong?
Nothing is wrong, this is normal.
Cpanellogd sends a SIGUSR1 (graceful restart) every ten minutes to apache for log rotation
and stats processing.
How can I add PHP support to my apache webserver ?
As root on the shell, via SSH, you should type:
- `/scripts/easyapache` and press return.
Select an option with PHP support from the easy to use menu and let it build the new apache with the php module.
Apache seems to crash with this error : [notice] child pid x exit signal File size limit exceeded (25)
This usually means that a log file has grown too large for the system (generally 2Gigs).
Run the following scripts:
- /scripts/updatenow
- /scripts/biglogcheck -v
If you have extremely large/active sites that reach this limit quickly, you might consider disabling logging for that site alltogether. You lose the webstats for it but you gain a decent
speed increase and you don't have to worry about it dropping apache.
HTTP Error code: "206 Partial content." How can I figure out what is wrong?
You should SSH into the server with root access. Then type this:
tail -f /usr/local/apache/logs/error_log (or type
apache2 if you are using Apache 2)
Now, go to that page again and see what error message is displayed in your SSH session.
Apache crashes whenever an account is created or deleted ? I'm running RedHat 7.3
RedHat 7.3 shipped with a broken psmisc rpm that turned a SIGUSR into a SIGPWR, which kills apache instantly with no logging (sigpwr says that the power went off and to close everything as fast as possible).
You can fix it by upgrading to the latest fixed RPM:
root@server [~]# cat /etc/redhat-release
Red Hat Linux release 7.3 (Valhalla)
root@server [~]# rpm -qa |grep -i misc
psmisc-20.2-2
root@server [~]# rpm -Uvh !http://ftp.cpanel.net/redhat/updates/7.3/en/os/i386/psmisc-20.2-3.73.i386.rpm
Retrieving !http://ftp.cpanel.net/redhat/updates/7.3/en/os/i386/psmisc-20.2-3.73.i386.rpm
Preparing...
########################################### [100%]
1:psmisc
########################################### [100%]
root@server [~]#
If that does not fix it there may be another configuration problem a tech will need to look at.