Я также попытался добавить локальный сервер веб-сервера в этот файл sudo nano /etc/apache2/apache2.conf и получил этот вывод при попытке перезапустить 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!
Ниже приведено то, что было в sudo nano /etc/apache2/conf.d/fqdn file:
webserver localhost
Затем я получил такой вывод:
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.
... fail!
Ниже приведено что было в журнале ошибок 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
Как я могу решить эту проблему?
Строка
webserver localhost
недопустима. Необходимо удалить его.
Использование ServerName, если Вы хотите установить FQDN:
ServerName localhost