If Apache does not start, the Web page is not accessible, or users cannot connect to the Web server, it is important to find the cause of the problem. Here are some typical places to look for error explanations and important things to check.
First, rcapache2 (described in
Section 46.3.3, “Activating, Starting, and Stopping Apache”) is
verbose about errors, so can be quite helpful if it is actually used for
operating
Apache. Sometimes it is tempting to use the binary
/usr/sbin/httpd2 for starting or stopping the Web
server. Avoid doing this and use the rcapache2
script instead. rcapache2 even provides tips and
hints for solving configuration errors.
Second, the importance of log files (see
Section 46.2.3.3, “Log Files”) cannot be
overemphasized. In case of both fatal and nonfatal errors, the Apache
log files are the places to look for causes. Additionally, you can
control the verbosity of the logged messages with the
LogLevel directive (see
Section 46.3.2.3.5, “LogLevel level
”) if more
detail is needed in the log files.
![]() | Tip |
|---|---|
Watch the Apache log messages with the command tail -F /var/log/apache2/*_log &. Then run rcapache2 restart. Now, try to connect with a browser and check the output. | |
A common mistake is not to open the ports for Apache in the firewall configuration of the server. If you configure Apache with YaST, there is a separate option available to take care of this specific issue (see Network Device Selection).
If the error cannot be tracked down with the help of any these, check the online Apache bug database at http://httpd.apache.org/bug_report.html. Additionally, the Apache user community can be reached via a mailing list available at http://httpd.apache.org/userslist.html. A recommended newsgroup is comp.infosystems.www.servers.unix.