I've been having trouble restarting Apache lately. I recently set up a web server with CentOS 7. I made some changes to my php.ini file and believe I need to restart apache before they will take effect. When i try to restart apache using systemctl restart httpd.service
or apachectl restart
I get the following error message:
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
I type in journalctl -xe
and receive:
httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2016-01-25 08:44:29 EST; 10s ago Docs: man:httpd(8) man:apachectl(8) Process: 25244 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 25243 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS) Main PID: 25243 (code=exited, status=0/SUCCESS)
Jan 25 08:44:29 localhost.localdomain systemd[1]: Starting The Apache HTTP Server... Jan 25 08:44:29 localhost.localdomain httpd[25243]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using l... message Jan 25 08:44:29 localhost.localdomain httpd[25243]: httpd (pid 10805) already running Jan 25 08:44:29 localhost.localdomain kill[25244]: kill: cannot find process "" Jan 25 08:44:29 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 Jan 25 08:44:29 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server. Jan 25 08:44:29 localhost.localdomain systemd[1]: Unit httpd.service entered failed state. Jan 25 08:44:29 localhost.localdomain systemd[1]: httpd.service failed. Hint: Some lines were ellipsized, use -l to show in full.
我重新启动服务器,现在apache似乎可以正常运行。
This is most likely a configuration error in your httpd.conf file
I had the same issue after I created a vhost.conf file in the conf.d. After I removed this newly created file (that contained a virtual host config) I could restart httpd without error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.