首页 > nginx+php7配置虚拟主机无法访问

nginx+php7配置虚拟主机无法访问

nginx+php7配置虚拟主机无法访问到我的laravel项目,访问页面一直报500错误码
我的配置:

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;
        }
}

教程很清晰:https://laravist.com/series/d...


试查看你nginx的error.log日志文件。

【热门文章】
【热门文章】