W3C httpd FAQ

Debugging W3C httpd

Suppose you think you have installed W3C httpd but it doesn't work. Here we assume you have used port 80. Please read the documentation carefully before sending mail to httpd.w3.org - we get a lot of mail and want to do development as well!

Use the Line Mode Browser as a test tool. Type

        www http://myhost.domain/
What happens?

Connection Refused

The browser tries to connect to the daemon but gets this status in the trace.

This means that nobody was listening on that port number. Check the port numbers match between server and client. Make sure you specify the port number explicitly in the document address for www.

If you are running the daemon standalone (as you should be), check that it is actually running by taking a list of processes, and that it is listening to the correct port (specified with -p port option), or try running it from the terminal with -v option as well. The trace for the server should say "socket, bind and listen all ok". If it does, and you still get "connection refused", then you must be talking to the wrong host (or, conceivably, different ethernet adapters on the same host).

If you are running with the inet daemon, then check both the services file (/etc/services) or database (yellow pages, netinfo) if your system uses it, and the /etc/inetd.conf file. Check the service name matches between these two (e.g. http).

Did you remember to kill -HUP the inetd when you changed the inetd.conf file?

Be aware that on some systems your local file /etc/services will not be consulted E.g. when ypbind is running on Suns, then you should type

        ypwhich -m services
and ask the administrator of the machine named to change its own /etc/services.

Try running the deamon from a shell window to see better what happens.

Cannot Connect To Information Server

The usual cause of this is that the server is not running, or it's running on a different port.

There is more information you can get. Use the "verbose" option on the LineMode browser to find out what went wrong:

        www -v http://myhost.domain:80/
What do you get? A load of trace messages. There are several cases.

Unable To Access Document

Typical cause of this is that the configuration file is incorrect, or files are not readable by the user-id under which the server runs. When you are running the server as root, it will automatically switch it to nobody just before serving the document. This can be changed with the UserId configuration directive.

An Empty Document Is Displayed

The document sent back is empty, but there is no error message.

The inetd has started a process to run your server but it immediately failed. Possibilities include:

Document Address Invalid Or Access Not Authorized...

...or some similar kind of error message. This means either: If you are the server administrator, and you can't understand why the daemon refuses to deliver the file,

Bad Output

A document is displayed, but not the one you wanted.

These are some ideas:


httpd@w3.org, July 1995