Apache를 실행하려고 하면 다음 오류가 표시됩니다.
[manideep@localhost ~]$ sudo httpd -t
Syntax OK
[manideep@localhost ~]$ sudo service httpd start
Redirecting to /bin/systemctl start 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.
[manideep@localhost ~]$ sudo service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2017-03-05 15:52:12 PST; 6s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 4115 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 4110 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 4110 (code=exited, status=1/FAILURE)
Mar 05 15:52:12 localhost.localdomain httpd[4110]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Mar 05 15:52:12 localhost.localdomain httpd[4110]: (98)Address already in use: AH00072: make_sock: could not bind to address ...0.0:80
Mar 05 15:52:12 localhost.localdomain httpd[4110]: no listening sockets available, shutting down
Mar 05 15:52:12 localhost.localdomain httpd[4110]: AH00015: Unable to open logs
Mar 05 15:52:12 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 05 15:52:12 localhost.localdomain kill[4115]: kill: cannot find process ""
Mar 05 15:52:12 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 05 15:52:12 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Mar 05 15:52:12 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Mar 05 15:52:12 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
답변1
어떤 프로그램이 포트를 점유하고 있는지 알아내야 합니다 80
.
netstat -ltp | grep :80
그런 다음 프로세스를 종료하고 Apache 서비스를 다시 시작하십시오.
답변2
웹사이트 파일에 문제가 있을 수 있습니다 *.conf
. 이 명령은 프롬프트를 표시할 수 있습니다.
apachectl configtest
답변3
나는 같은 문제가 있었고 그것을 해결했습니다.
sudo service apache2 start
작업 apache2.service failed
이유는 제어 프로세스가 오류 코드와 함께 종료되었기 때문입니다. 자세한 내용은 및 " "를 참조하세요 systemctl status apache2.service
.journalctl -xe
구성 문제가 있습니다 000-default.conf
. VirtualHost 태그를 제대로 닫지 않았습니다.