search

Home  >  Q&A  >  body text

laravel - nginx+php7 configuration virtual host cannot be accessed

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;
        }
}
伊谢尔伦伊谢尔伦2772 days ago630

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 16:53:52

    The tutorial is very clear: https://laravist.com/series/d...

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 16:53:52

    Try to check your nginx error.log log file.

    reply
    0
  • Cancelreply