我试图添加新域,但是在尝试重新启动apache之后,我得到了以下内容:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2017-08-17 07:58:06 UTC; 15s ago
Docs: man:systemd-sysv-generator(8)
Process: 2026 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/etc/sentora/panel/] does not exist
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/var/sentora/hostdata/trgovac/public_html/trgovac_rs] does not exist
Aug 17 07:58:06 server apache2[2026]: (2)No such file or directory: AH02291: Cannot access directory '/var/sentora/logs/domains/banko-sistemi/' for error log of vhost defined at /etc/apache2/sites-enabled/svi.conf:687
Aug 17 07:58:06 server apache2[2026]: AH00014: Configuration check failed
Aug 17 07:58:06 server apache2[2026]: Action 'configtest' failed.
Aug 17 07:58:06 server apache2[2026]: The Apache error log may have more information.
Aug 17 07:58:06 server systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 17 07:58:06 server systemd[1]: Failed to start LSB: Apache2 web server.
Aug 17 07:58:06 server systemd[1]: apache2.service: Unit entered failed state.
Aug 17 07:58:06 server systemd[1]: apache2.service: Failed with result 'exit-code'.有人知道为什么会发生这种事吗?如何重新启动apache?
发布于 2017-08-17 08:12:36
您的安装中存在一些权限问题。您可以从以下日志的最后2行中找到这一点:
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/etc/sentora/panel/] does not exist
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/var/sentora/hostdata/trgovac/public_html/trgovac_rs] does not exist
Aug 17 07:58:06 server apache2[2026]: (2)No such file or directory: AH02291: Cannot access directory '/var/sentora/logs/domains/banko-sistemi/' for error log of vhost defined at /etc/apache2/sites-enabled/svi.conf:687
Aug 17 07:58:06 server apache2[2026]: AH00014: Configuration check failed有两个警告(这些只是警告,不会让Apache失败,但值得注意)。您已经在虚拟主机的配置2中配置了不存在的文档根。一个在/etc/sentora/panel/,另一个在/var/sentora/hostdata/trgovac/public_html/trgovac_rs。
但是,导致Apache无法启动的错误是,它试图创建/修改Apache在/var/sentora/logs/domains/banko-sistemi/中无法访问的日志。
要解决这个问题,请确保目录存在,如果它没有创建目录,并授予Apache修改它的访问权限:
sudo mkdir -p /var/sentora/logs/domains/banko-sistemi
sudo chown -u www-data /var/sentora/logs/domains/banko-sistemi如果您更改了默认的Apache用户,请将www-data更改为您为Apache选择的任何用户。
发布于 2017-08-17 08:06:01
我来解决这个问题。我在这个位置上创建了目录“banko”/var/sentora/log/domains/banko/。
之后,我重新启动apache,没有任何问题。
https://askubuntu.com/questions/947005
复制相似问题