升级到Apache 2.4.6后出错

时间:2013-08-05 06:08:41

标签: apache

“a2nsite”“a2dissite”无效

回声:

  

错误:网站XXXXXX不存在!

我发誓它存在于sites-available文件夹中。

输入a2ensite并双击 Tab 按钮后,它会显示/root目录。

a2en / dissite脚本一定有问题。

如何让它恢复工作?

===================== 以下是错误日志的最后几行:

[Sun Aug 04 22:59:31.406192 2013] [mpm_event:notice] [pid 5378:tid 140459282536256] AH00489: Apache/2.4.6 (Ubuntu) configured -- resuming normal operations
[Sun Aug 04 22:59:31.406433 2013] [core:notice] [pid 5378:tid 140459282536256] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 04 23:09:44.648984 2013] [mpm_event:notice] [pid 5378:tid 140459282536256] AH00491: caught SIGTERM, shutting down
[Sun Aug 04 23:09:46.001182 2013] [mpm_event:notice] [pid 5692:tid 139671144335168] AH00489: Apache/2.4.6 (Ubuntu) configured -- resuming normal operations
[Sun Aug 04 23:09:46.001490 2013] [core:notice] [pid 5692:tid 139671144335168] AH00094: Command line: '/usr/sbin/apache2'

2 个答案:

答案 0 :(得分:33)

/etc/apache2/sites-available/*中的网站配置文件重命名为*.conf帮助。

示例,在启用站点dummy.com时,配置文件必须命名为dummy.com.conf

答案 1 :(得分:14)

另一种解决方案是在/etc/apache2/apache2.conf中更改此行:

IncludeOptional sites-enabled/*.conf

为:

IncludeOptional sites-enabled/*