Reputation: 85
I am trying to setup Magmi with Magento. When I access my domain.com/magmi/web/magmi.php the magmi.php trys to download. My Ngnix config looks like below.
I had to change root $MAGE_ROOT/pub;
to root $MAGE_ROOT
as it was point to the /pub directory
> # PHP entry point for setup application location ~* ^/setup($|/) {
> root $MAGE_ROOT;
> location ~ ^/setup/index.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";
> } }
# PHP entry point for main application
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass fastcgi_backend;
fastcgi_buffers 1024 4k;
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;
}
# PHP entry point for update application
location ~* ^/update($|/) {
root $MAGE_ROOT;
location ~ ^/update/index.php {
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
Edit - Removing `$MAGE_ROOT/pub; actually stopped the magento site from loading correctly. I moved the magmi folder to the pub directory but php file still downloads
Upvotes: 2
Views: 130