Ngnix下载php - Magento / Magmi

时间:2018-01-18 15:12:10

标签: php magento magento2 magmi

我正在尝试用Magento设置Magmi。当我访问我的domain.com/magmi/web/magmi.php时,magmi.php尝试下载。我的Ngnix配置如下所示。

我必须将root $MAGE_ROOT/pub;更改为root $MAGE_ROOT,因为它指向/ pub目录

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

编辑 - 删除`$ MAGE_ROOT / pub;实际上阻​​止了magento网站正确加载。我将magmi文件夹移动到pub目录,但php文件仍然下载

0 个答案:

没有答案