我已经重新加载了服务器配置,以匹配Laravel上提供的配置。当我这么做的时候
php --ini
我可以看到我的PHP版本是7.0,所以我对7.0做了修改。
我的服务器配置如下所示:
server {
server_name exoscape.co.uk;
root /var/www/html/exoscape/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/exoscape.co.uk/fullchain.pem; # manag$
ssl_certificate_key /etc/letsencrypt/live/exoscape.co.uk/privkey.pem; # man$
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = exoscape.co.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name exoscape.co.uk;
return 404; # managed by Certbot
}
chmod
正确地执行以下操作:
sudo chown -R www-data:www-data /var/www/html/exoscape/
sudo chmod -R 755 /var/www/html/exoscape/
但我仍然收到502坏网关当我访问我的域名。我正在使用
nginx/1.15.12
. 任何帮助都将不胜感激。