nginx+php7 configuration virtual host cannot access my laravel project, and the access page keeps reporting a 500 error code
My configuration:
server {
listen 80;
listen [::]:80;
server_name demo.cn;
root /var/www/laravel-blog/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}