无法在 ubuntu 12.04 中访问 apache2

无法在 ubuntu 12.04 中访问 apache2

我尝试在笔记本电脑上启动/重新启动/重新加载 apache2,但结果失败,错误如下:

Syntax error on line 1 of /etc/apache2/conf.d/fqdn: Invalid command 'exit', 
perhaps misspelled or defined by a module not included in the server configuration
Action 'start' failed. The Apache error log may have more information.

如何解决?

答案1

启用 headers 模块

sudo ln -sf /etc/apache2/mods-available/headers.load /etc/apache2/mods-enabled/headers.load

重新启动 Apache

sudo service apache2 restart

相关内容