Troubleshooting


You can use service and the httpd init script to check the syntax of the Apache configuration files:

# service httpd configtest Syntax OK


Once you start the httpd daemon, you can confirm that Apache is working correctly by pointing a browser on the local system at http://localhost/. From a remote system, use http://server/, substituting the hostname of the server for server. In response, Apache displays the Red Hat test page.

If the browser does not display the test page, it will display one of two errors: Connection refused or an error page. If you get a Connection refused error, make sure that port 80 is not blocked by a firewall (page 788) and check that the server is running:

# /sbin/service httpd status httpd (pid 21406 21405 21404 21403 21402 21401 13622) is running...


If the server is running, check that you did not specify a port other than 80 in a Listen directive. If you did, the URI you specify in the browser must reflect this port number (http://localhost:port specifies port port). Otherwise, check the error log (/var/log/httpd/error_log) for information on what is not working.

To verify that the browser is not at fault, use telnet to try to connect to port 80 of the server:

$ telnet www.example.com 80 Trying 192.0.34.166... Connected to www.example.com. Escape character is '^]'. CONTROL-] telnet> quit Connection closed.


If Connection refused is displayed, you have verified that you cannot get through to the server.




A Practical Guide to Red Hat Linux
A Practical Guide to Red HatВ® LinuxВ®: Fedoraв„ў Core and Red Hat Enterprise Linux (3rd Edition)
ISBN: 0132280272
EAN: 2147483647
Year: 2006
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net