Solucionar problema del ServerName en Apache 2

Solucionar problema del ServerName en Apache 2

Estaba instalando Apache en un servidor. Cuando lo estaba reiniciando al realizar unos cambios me he encontrado con el siguiente error:

ahornero@6581-D:~$ 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

¿Cómo solucionarlo?

Por defecto, en Apache2 sobre Unix, el archivo httpd.conf deberá estar en blanco. Para solucionar este warning, lo editamos:

ahornero@6581-D:~$ sudo nano /etc/apache2/httpd.conf

Y añadimos la siguiente línea:

ahornero@6581-D:~$ ServerName nombre_o_ip_del_servidor

Guardamos, reiniciamos el servicio y listo.

ahornero@6581-D:~$ sudo /etc/init.d/apache2 restart