Magento 2 / Nginx

Magmi NGINX configuration

by ,


What is Magmi

Magmi is a Magento Mass Importer developed as a magento DATABASE client, (ie not a magento extension) , that operates directly in SQL and is the result of a deep analysis of the Magento Database Model. The first magmi goal was catalog import & update.

Nginx configuration for Magmi

Download and put Magmi source files to your Magento directory, not into pub directory!

Following that, use the following config:

location ~ /magmi/(.*) {
    root /srv/www/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;
    }
}

Now you can access https://example.com/magmi/magmi.php.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.