Php 我试图在linux上启动laravel项目

Php 我试图在linux上启动laravel项目,php,laravel,apache,httpd.conf,amazon-linux,Php,Laravel,Apache,Httpd.conf,Amazon 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 s

突然。。。我的网站发生超时错误。 似乎这个过程不起作用。 我应该如何重新启动项目

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..."
@努齐回答这里

请编辑httpd.conf文件

/usr/local/etc/httpd/httpd.conf
替换

Listen 80

重新启动apache

sudo apachectl -k restart

可能您尝试在两个配置文件中使用相同的端口,或者在其他服务(如nginx)上使用80端口。尝试
sudolsof-n-i:80 | grep LISTEN
检查使用80端口的进程


此外,您还错过了执行
systemctl
命令的
sudo
命令。可能是权限问题。

似乎您有两个配置文件在同一端口中侦听。如何修复配置文件?什么是启动过程?
/usr/local/etc/httpd/httpd.conf
Listen 80
Listen 127.0.0.1:80
sudo apachectl -k restart