RedHat/CentOS:
You might probably faced the same following error while you were restarting the Apache/httpd server on CentOS/RedHat.
1 2 3 4 5 | Starting httpd: httpd: apr_sockaddr_info_get() failed for iLabSK.localhost httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [ OK ] |
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
1 2 3 | # vi /etc/httpd/conf/httpd.conf |
Note: You need to be a root or super user access to edit this file.
Add the following line to top of the httpd.conf file.
1 2 3 | ServerName localhost |
Save the file and exit from vi editor. Finally restart the httpd server.
1 2 3 | # service httpd restart |
Result:
1 2 3 4 | Stopping httpd: [ OK ] Starting httpd: [ OK ] |
Ubuntu/Debian:
You might probably faced the same following error while you were restarting the Apache/httpd server on CentOS, RedHat, ubuntu or debian.
1 2 3 4 5 | $ sudo /etc/init.d/apache2 restart * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName |
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
1 2 3 | $ sudo vi /etc/apache2/httpd.conf |
Note: You need to be a root or super user access to edit this file.
By default httpd.conf file will be blank. Now, simply add the following line to the file.
1 2 3 | ServerName localhost |
Save the file and exit from vi editor. Finally restart the apache server.
1 2 3 | sudo /etc/init.d/apache2 restart |