O reinício do apache2 falha no Ubuntu 12.04

1

Eu também tentei adicionar o servidor web localhost ao arquivo sudo nano /etc/apache2/apache2.conf e obtive esta saída quando tentei reiniciar o apache2:

ubuntu@webserver:~$ sudo service apache2 restart
Syntax error on line 38 of /etc/apache2/apache2.conf:
Invalid command 'webserver', perhaps misspelled or defined by a module not included        in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!

Abaixo está o que estava no arquivo sudo nano /etc/apache2/conf.d/fqdn:

webserver localhost

Eu então recebi esta saída:

ubuntu@webserver:~$ sudo service apache2 restart
Syntax error on line 1 of /etc/apache2/conf.d/fqdn:
Invalid command 'webserver', perhaps misspelled or defined by a module not included   in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

... falha!

Abaixo está o que estava no log de erros do apache:

[Tue Mar 25 12:35:48 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.10 with Suhosin-Patch configured -- resuming normal operations
[Tue Mar 25 12:41:47 2014] [notice] caught SIGTERM, shutting down
[Tue Mar 25 12:41:48 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.10 with Suhosin-Patch configured -- resuming normal operations
[Tue Mar 25 12:44:01 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.10 with Suhosin-Patch configured -- resuming normal operations
[Tue Mar 25 12:53:18 2014] [notice] caught SIGTERM, shutting down
[Tue Mar 25 12:53:19 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.10 with Suhosin-Patch configured -- resuming normal operations
[Fri Mar 28 18:19:42 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.10 with Suhosin-Patch configured -- resuming normal operations

Como posso resolver este problema?

    
por Joe 28.03.2014 / 20:11

1 resposta

0

A linha

webserver localhost

é inválido. Você tem que removê-lo.

Use ServerName se quiser definir o FQDN:

ServerName localhost
    
por Florian Diesch 28.03.2014 / 20:30