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;
        }
}
阅读 5.6k
2 个回答

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题