0

I've downloaded Magento 2 and try to setup but getting blank page.

When I have checked nginx log file and I found below the log.

FastCGI sent in stderr: "Access to the script '/var/www/html/magento2/demo/setup/index.php/navigation' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 127.0.0.1, server: 224.example.com, request: "GET /setup/index.php/navigation HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "224.example.com", referrer: "http://224.example.com/setup/"; 2018/05/23 16:58:47 [error] 18961#18961: 319 FastCGI sent in stderr: "Access to the script '/var/www/html/magento2/demo/setup/index.php/navigation/side-menu' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 127.0.0.1, server: 224.example.com, request: "GET /setup/index.php/navigation/side-menu HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "224.example.com", referrer: "http://224.example.com/setup/"; 2018/05/23 16:58:47 [error] 18959#18959: *377 FastCGI sent in stderr: "Access to the script '/var/www/html/magento2/demo/setup/index.php/navigation/header-bar' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 127.0.0.1, server: 224.example.com, request: "GET /setup/index.php/navigation/header-bar HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "224.example.com", referrer: "http://224.example.com/setup/";

If anyone faces the same issue then help me.

2
  • I saw you solved your problem, gj! A small advice from me, did you try to run the installation from command line ? I think it's a lot simpler, and you don't got trubles reinstalling Magento 2 later on, you just tap 2 commands (uninstall/install) devdocs.magento.com/guides/v2.3/install-gde/install/cli/… Jan 21, 2020 at 11:22
  • Hi guys I have the same problem with Magento 2.4.0 and I don't have a Web setup wizard Icon I will appreciate it if someone helps me
    – Ramon86
    Jan 26, 2021 at 20:33

2 Answers 2

6

Solved:

Changed nginx.conf.sample setup location block to:

Default Magento nginx.conf.sample file need to replace.

location ~* ^/setup($|/) {
    root $MAGE_ROOT;
    location ~ ^/setup/index.php {
        fastcgi_pass   fastcgi_backend;

        fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";
        fastcgi_param  PHP_VALUE "memory_limit=768M \n max_execution_time=600";
        fastcgi_read_timeout 600s;
        fastcgi_connect_timeout 600s;

        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ ^/setup/(?!pub/). {
        deny all;
    }

    location ~ ^/setup/pub/ {
        add_header X-Frame-Options "SAMEORIGIN";
    }
}

Replace with:

location /setup {
    root $MAGE_ROOT;
    location ~ ^/setup/index.php {

        ### This fixes the problem:
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        ################################

        fastcgi_pass   fastcgi_backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location ~ ^/setup/(?!pub/). {
        deny all;
    }

    location ~ ^/setup/pub/ {
        add_header X-Frame-Options "SAMEORIGIN";
    }
}

Found solution from git

2

No need to Replace whole code in nginx.conf.sample just replace location ~* ^/setup($|/) to location ^/setup($|/) .

Because issue is ~* sign before setup Url, browser doesn't understand this

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.