Web server - 664 Part V . Running Servers Some configuration

664 Part V . Running Servers Some configuration problems pass the syntax tests performed by apachectl, but then result in the HTTP daemon exiting immediately after reloading its configuration. If this happens, use the tail command to check Apache s error log for useful information. On Debian systems, the error log is in /var/log/apache/error.log. On other systems, the location can be found by looking for the ErrorLog directive in your Apache configuration. An error message that you might encounter looks something like this: [crit] (98)Address already in use: make_sock: could not bind to port 80 This error often indicates that something else is bound to port 80 (not very common unless you have attempted to install another Web server), that another Apache process is already running (apachectl usually catches this), or that you have told Apache to bind the same IP address and port combination in more than one place. You can use the netstat command to view the list of programs (including Apache) with TCP ports in the LISTEN state: # netstat -nltp Active Internet connections (only servers) Proto Local Address Foreign Address State PID/Program name tcp 0.0.0.0:80 0.0.0.0:* LISTEN 2105/apache The output from netstat (which was shortened to fit here) indicates that an instance of the apache process with a process ID of 2105 is listening (as indicated by the LISTEN state) for connections to any local IP address (indicated by 0.0.0.0) on port 80 (the standard HTTP port). If a different program is listening to port 80, it is shown there. You can use the kill command to terminate the process, but if it is something other than apache (or httpd), you should also find out why it is running. If you don t see any other processes listening on port 80, it could be that you have accidentally told Apache to listen on the same IP address and port combination in more than one place. There are three configuration directives that can be used for this: BindAddress, Port, and Listen: . BindAddress enables you to specify a single IP address to listen on, or you can specify all IP addresses using the * wildcard. You should never have more than one BindAddress statement in your configuration file. . Port specifies which TCP port to listen on but does not enable you to specify the IP address. Port is generally not used more than once in the configuration. . Listen enables you to specify both an IP address and a port to bind to. The IP address can be in the form of a wildcard, and you can have multiple Listen statements in your configuration file.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Leave a Reply