Kiedy próbuję uruchomić Apache, wyświetla mi się ten błąd:

[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. 

Komentarze

  • " Adres już używany " jest dość oczywiste 🙂 Albo słuchasz czegoś innego: 80, albo Listen 80 wiele razy w plikach konfiguracyjnych.

Odpowiedź

Musisz dowiedzieć się, który program zajmuje port 80,

netstat -ltp | grep :80 

Następnie zakończ ten proces i uruchom ponownie usługę Apache

Odpowiedź

Może to być problem z plikiem *.conf witryny. To polecenie może dać wskazówkę:

apachectl configtest 

Odpowiedź

Miałem ten sam problem i naprawiłem go.

sudo service apache2 start

Praca dla apache2.service failed becau se proces sterowania zakończył się z kodem błędu. Zobacz systemctl status apache2.service i „journalctl -xe”, aby uzyskać szczegółowe informacje.

Wystąpił problem z konfiguracją w 000-default.conf. Nie zamknąłem poprawnie tagu VirtualHost.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *