在Apache2虚拟主机中启用ErrorLog会在服务器重启时引发错误

时间:2018-04-17 14:46:06

标签: apache centos7

信息: 服务器在CentOS7上运行

我在虚拟主机配置文件中有以下配置。

<VirtualHost *:80>
    ServerName www.codealpha.me
    ServerAlias codealpha.me
    DocumentRoot /var/www/codealpha.me/public_html
    ErrorLog "/var/www/codealpha.me/error.log"
    CustomLog /var/www/codealpha.me/requests.log combined
</VirtualHost>

执行systemctl restart httpd.service时,命令行会抛出以下错误:Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

执行时systemctl status httpd.service -l给出:

Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the /etc/sysconfig/httpd config file.
* httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-04-17 14:36:41 UTC; 5min ago
Docs: man:httpd(8)
      man:apachectl(8)
Process: 6207 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 6206 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 6206 (code=exited, status=1/FAILURE)

Apr 17 14:36:41 codealpha systemd[1]: Starting The Apache HTTP Server...
Apr 17 14:36:41 codealpha systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 17 14:36:41 codealpha kill[6207]: kill: cannot find process ""
Apr 17 14:36:41 codealpha systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 17 14:36:41 codealpha systemd[1]: Failed to start The Apache HTTP Server.
Apr 17 14:36:41 codealpha systemd[1]: Unit httpd.service entered failed state.
Apr 17 14:36:41 codealpha systemd[1]: httpd.service failed.

0 个答案:

没有答案