5

I am trying to install a magento 2 on an OVH shared hosting with a private sql server. I copied a magento 2 new package and I am currently encountering the following error when trying to launch the setup :

http://xxxxxx/setup/index.php/navigation Failed to load resource: the server responded with a status of 404 (Not Found)
http://xxxxxx/setup/index.php/navigation/side-menu Failed to load resource: the server responded with a status of 404 (Not Found)
http://xxxxxx/setup/index.php/navigation/header-bar Failed to load resource: the server responded with a status of 404 (Not Found)

Then after some time waiting on the page i get this :

angular.js:7715 POST http://xxxxxx/setup/index.php/session/prolong 404 (Not Found)

The setup works fine in local, what should I do ?

It isn't a Symlink error, I already modified the "virtualType name="developerMaterialization" section, and deleted files under pub/static.

My errors are angular.js errors.

enter image description here

Marius
  • 197,939
  • 53
  • 422
  • 830
Malcom
  • 151
  • 1
  • 3

2 Answers2

10

I fix this by the https://github.com/magento/magento2/issues/2504#issuecomment-159663316

Here is the code

  1. My nginx site config

    upstream fastcgi_backend {
        server unix:/var/run/php/php7.0-fpm.sock;
    }
    
    server {
        listen 80;
        server_name YOUR_IP_OR_DOMAIN_NAME;
        set $MAGE_ROOT YOUR_MAGENTO_FILE_PATH;
        set $MAGE_MODE developer;
        include YOUR_MAGENTO_FILE_PATH/nginx.conf.sample;
    }
    

2.Modify the nginx.conf.sample file

    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;
        }

    }
  1. Open th url in the browser

    http://YOUR_IP_OR_DOMAIN_NAME/setup

Wen Wei
  • 353
  • 1
  • 7
  • 16
0

I understand your situation so here is my solution form magento installation virtualhost for nginx.

  1. Just u have to change php-fpm address according to your configuration

  2. Set mage_root according to your magento installation folder.

  3. Comment the cgi.fix_pathinfo=0 by ;cgi.fix_pathinfo=0

  4. Also php-fpm config file www.conf must have user nginx like
    user = nginx
    group = nginx
    listen.owner = nginx
    listen.group = nginx
    listen.mode = 0660

  5. You php session dir must have ownership of nginx.

  6. Here is Nginx VirtualHost Configuration file for magento2:> If u dont understand download this clean text file from this link.... https://drive.google.com/file/d/1MI0JKx5Gx_dLFz2c6fyubgpSmM_TESux/view?usp=sharing Download VirtualHost file