macopedia / magmi-m2

Magmi GitHub, see branch magento2 for a version compatible with Magento 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

404 /magmi/web/magmi.php Magento 2.4

JosephGourvenec opened this issue · comments

Hi Guys,

I've tried and tried to get this working, searched and read every post about this 404 issue.

I'm hoping this is something you can advise and clear up why please and what needs to happen to make it work.

In my dev site visiting /magmi/web/magmi.php it always 404's

I've updated the nginx.conf.simple file with the below and other versions of the below from alternate sources

location ~ /magmi/(.) {
root $MAGE_ROOT;
#root /home/storm/sites/example.com/magmi;
try_files /web/$1 /web/$1/;
location ~ ^/magmi/(.
.php)$ {
try_files /web/$1 =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm-EXAMPLE.com.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_FLAG "session.auto_start=off \n #suhosin.session.cryptua=off";
#fastcgi_param PHP_VALUE "memory_limit=2G \n max_execution_time=3600";
fastcgi_read_timeout 3600s;
fastcgi_connect_timeout 3600s;
include fastcgi_params;
}
}

Cheers,
Joe

Hi again,

To add I've also tried both snippets from #23 too and also don't work
"#23"

Cheers,
Joe

If you install Magmi using composer, then ensure proper path to it, e.g.:

location /magmi/ {
    auth_basic off;
    alias /srv/www/example.com/vendor/macopedia/magmi2/magmi/web/;
    location ~ \.php$ {
        fastcgi_pass   unix:/var/run/php-fpm/php-fpm-example.com.sock;
        fastcgi_index  index.php;
        # fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        # $request_filename makes more sense in combination with alias
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";
        fastcgi_param  PHP_VALUE "memory_limit=2G \n max_execution_time=3600";
        fastcgi_read_timeout 3600s;
        fastcgi_connect_timeout 3600s;
        include fastcgi_params;
    }
}

In my dev site visiting /magmi/web/magmi.php it always 404's

With any of the above configs, the proper URI is /magmi/magmi.php (without web).