Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Magento 2.0.2 on Nginx setup page not functioning

Need some help installing Magento 2.0.2 on nginx 1.9.3 with php-fpm currently I'm using the default configuration provided by Magento ( https://github.com/magento/magento2/blob/develop/nginx.conf.sample ).

The issue that's happening is when accessing /setup after unpacking it I'm presented with a 403 on "setup/index.php/navigation" as well as other URLs the page attempts to access.

I've realized the issue behind this is that it's not passing "navigation" as an argument to the index.php file and is actually looking for "index.php/navigation" as a file and attempting to pass that to php5-fpm which results in security.limit_extensions to be triggered causing the 403.

So the question becomes how do I get requests to process properly? E.X. when the javascript being rendered by the setup index.php requests index.php/navigation how do I ensure it's passed to index.php as an argument instead of trying to look for a file at "index.php/navigation" as if index.php were a directory.

like image 455
PermaNull Avatar asked Mar 27 '26 04:03

PermaNull


1 Answers

This problem become more and more common as I can see. It seems that fastcgi_split_path_info needs to define. Try to changed nginx.conf.sample /setup location block (I pointed to solution-code with ##) to:

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";
}}
like image 147
deenoize Avatar answered Mar 28 '26 16:03

deenoize



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!