File not found when starting Laravel with Nginx using LaraDock

I learn Laravel using his tutorial. I installed Laravel and the necessary stacks using LaraDock .

Nginx returns File not found when I go to the IP address of the application. Below is the NGINX configuration.

server {
        root /var/www/laravel/public/;
        listen 80 default_server;

        listen [::]:80 default_server ipv6only=on;
        index index.php index.html index.htm;
        location / {
             try_files $uri $uri/ /index.php$is_args$args;
        }

        location ~ \.php$ {
            try_files $uri /index.php =404;
            fastcgi_pass php-upstream;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
        location ~ /\.ht {
            deny all;
        }
}

This is an error from the NGINX error log.

2016/08/19 08:53:06 [error] 47 # 47: * 16 FastCGI sent to stderr: "Primary script unknown" while reading the response header up, client: 192.168.99.1, server :, request: "GET / HTTP /1.1 ", upstream:" fastcgi: //111.13.0.5: 9000 ", host:" 192.168.99.100 "

+4
source share

Source: https://habr.com/ru/post/1651758/


All Articles