Troubleshooting
The following subsections describe several common problems that you might encounter the first time you start Apache.
Already an Existing Web Server
If there is already a server running in the machine and listening to the same IP address and port combination, Apache will not be able to start successfully. You will get an entry in the error log file indicating that Apache cannot bind to the port:
[crit] (48)Address already in use: make_sock: could not bind to address 10.0.0.2:80
[alert] no listening sockets available, shutting down
To solve this problem, you need to stop the running server or change the Apache configuration to listen on a different port.
No Permission to Bind to Port
You will get an error if you do not have administrator permissions and you try to bind to a privileged port (between 0 and 1024):
[crit] (13)Permission denied: make_sock: could not bind to address 10.0.0.2:80
[alert] no listening sockets available, shutting down
To solve this problem, you must either log on as the administrator before starting Apache or change the port number (8080 is a commonly used nonprivileged port).
Access Denied
You might not be able to start Apache if you do not have permission to read the configuration files or to write to the log files. You will get an error similar to the following:
(13)Permission denied: httpd: could not open error log file /usr/local/apache2/logs/error_log.
This problem can arise if Apache was built and installed by a different user than the one trying to run it.
Wrong Group Settings
You can configure Apache to run under a certain username and group. Apache has default values for the running server username and group. Sometimes the default value is not valid, and you will get an error containing setgid: unable to set group id.
To solve this problem on Linux/Unix and Mac OS X, you must change the value of the Group directive in the configuration file to a valid value. Check the /etc/groups file for existing groups.
|