/install/license problems under nginx
  • Hello there,
    i've installing newscoop using nginx on my server. Currently on second install stage i'm getting file not found error. Could you help me with it?
    Here is my full nginx config file and error log showed under that
    server {
            listen 80;
            listen [::]:80 proxy_protocol;
            set $cs_root /var/www/magento/nostra.life/html/web;
            root $cs_root/;

            # Add index.php to the list if you are using PHP
            index index.php;

            server_name nostra.life www.nostra.life;

            # enforce https
            return 301 https://$server_name$request_uri;
            }


    server {
            listen 443 ssl http2;
            listen [::]:443 ssl http2 proxy_protocol;
            server_name nostra.life www.nostra.life;
            set $cs_root /var/www/magento/nostra.life/html/web;
            root $cs_root/;
            access_log /var/log/nginx/nostra.app-access.log;
            error_log  /var/log/nginx/nostra.app-error.log error;
            index index.php;

            # allow larger file uploads and longer script runtimes
            client_body_buffer_size  1000k;
            client_header_buffer_size 1000k;
            client_max_body_size 1000k;
            large_client_header_buffers 4 1000k;
            sendfile off;

            # strengthen ssl security
            ssl_certificate /etc/ssl/certs/nostra.crt;
            ssl_certificate_key /etc/ssl/certs/nostra.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_prefer_server_ciphers on;
            ssl_session_cache shared:SSL:10m;

        # images, attachments
        rewrite /get_img$ $cs_root/get_img.php break;
        rewrite /attachment/ $cs_root/attachment.php break;

        # catch non-existent cache filenames
        location ~* /+cache/
    {         try_files $uri $cs_root/index.php break;     }

        # the large .htaccess block for redirecting into index.php
        set $fixed_file "no";

        if ($request_filename ~* "\.(html|css|js|php|ico|gif|png|jpg)$")

    {         set $fixed_file "yes";     }

        rewrite /js/ $uri break;
        if ($request_filename ~* "(/plugins/[^/]*)?/(js|css|images)")

    {        set $fixed_file "yes";    }

        if ($request_filename ~* "/+(admin|install|themes|videos|pdf)")

    {         set $fixed_file "yes";     }

        if ($fixed_file = "no")
    {         rewrite .* $cs_root/index.php break;     }

        # templates
        rewrite \.tpl$ $cs_root/index.php break;

        # admin interface
        rewrite /admin$ $cs_root/admin.php break;
        rewrite /admin/ $cs_root/admin.php break;
        rewrite /admin-files $cs_root/admin.php break;

    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param CORE_TYPE frameworks;
            include fastcgi_params;
            fastcgi_buffers 1024 4k;
            fastcgi_param  PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
            fastcgi_read_timeout 600s;
            fastcgi_connect_timeout 600s;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    }

    location /install/ {
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_buffers 1024 4k;
            fastcgi_param  PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
            fastcgi_read_timeout 600s;
            fastcgi_connect_timeout 600s;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include fastcgi_params;
        }

    }

    If i'm trying to install, i'm getting in logs:

    2017/12/03 15:42:06 [error] 12046#12046: *1756 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 212.116.126.62, server: nostra.life, request: "GET /install/license HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "nostra.life", referrer: "https://nostra.life/install/"


    If i remove location /install/, i'm simply getting error that link not found.

    Full (extremly full nginx config) config can be found here 
    Post edited by Robert Atlas at 2017-12-03 07:56:33
  • 1 Comment sorted by
  • Still have no chance to fix it. Help please.