“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'
将/etc/apache2/sites-available/*
中的站点配置文件重命名为*.conf
有所帮助。
例如,在启用站点dummy.com
时,配置文件必须命名为dummy.com.conf
。
另一个解决方案是在/etc/apache2/apache2.conf
中更改此行:
IncludeOptional sites-enabled/*.conf
至:
IncludeOptional sites-enabled/*