升级到Apache 2.4.6后出错

问题描述 投票:20回答:2

“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'
apache
2个回答
33
投票

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

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


14
投票

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

IncludeOptional sites-enabled/*.conf

至:

IncludeOptional sites-enabled/*
© www.soinside.com 2019 - 2024. All rights reserved.