Я попытался запустить проект laravel в Linux.

Внезапно... на моем сайте происходит ошибка тайм-аута. вроде не процесс не работает. Как перезапустить проект...

php-fpm.conf

$  service apache2 restart
Redirecting to /bin/systemctl restart apache2.service
Failed to restart apache2.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status apache2.service' for details.
[ec2-user@ip-172-31-30-200 laravel6]$ systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: failed (Result: exit-code) since Mon 2021-04-12 09:12:06 ; 1min 48s ago
     Docs: man:httpd.service(8)
  Process: 4123 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 4123 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."
.ap-northeast-1.compute.internal systemd[1]: Starting The Apache HTTP Server...
.ap-northeast-1.compute.internal httpd[4123]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
.ap-northeast-1.compute.internal httpd[4123]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
.ap-northeast-1.compute.internal httpd[4123]: no listening sockets available, shutting down
.ap-northeast-1.compute.internal httpd[4123]: AH00015: Unable to open logs
.ap-northeast-1.compute.internal systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
.ap-northeast-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.
.ap-northeast-1.compute.internal systemd[1]: Unit httpd.service entered failed state.
.ap-northeast-1.compute.internal systemd[1]: httpd.service failed.

$ systemctl restart php7.0-fpm.service 
Failed to restart php7.0-fpm.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status php7.0-fpm.service' for details.
$  systemctl stop httpd
Failed to stop httpd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status httpd.service' for details.

person user14232549    schedule 12.04.2021    source источник
comment
кажется, у вас есть 2 файла конфигурации, которые прослушиваются в одном порту   -  person Kamlesh Paul    schedule 12.04.2021
comment
Как исправить файл конфигурации? Какая конфигурация предотвращает запуск процесса?   -  person user14232549    schedule 12.04.2021


Ответы (2)


@nuzil ответь здесь,

48) Адрес уже используется : AH00072: make_sock: не удалось выполнить привязку к адресу [::]:80

Пожалуйста, отредактируйте файл httpd.conf.

/usr/local/etc/httpd/httpd.conf

И заменить

Listen 80

с

Listen 127.0.0.1:80

Перезапустите апач

sudo apachectl -k restart
person Vel    schedule 12.04.2021

Возможно, вы пытались использовать один и тот же порт в двух файлах конфигурации или 80-й порт, используемый в другом сервисе, таком как nginx. Попробуйте sudo lsof -n -i :80 | grep LISTEN проверить процесс, использующий 80 порт.

Кроме того, вы пропустили команду sudo для выполнения команды systemctl. Возможно, это проблема с разрешением.

person Hoto Cocoa    schedule 12.04.2021