1

Magento 版本。1.7.0.2

问题

我无法在 nginx 实例上运行的 magento 中编辑/删除类别。有没有人遇到过这样的问题,谷歌搜索出现了不起作用的解决方案。

Nginx 配置

server {

    listen       80;
    server_name  localhost;
    client_max_body_size 20M;

    access_log log/access.log main;
    error_log log/error.log;

    root   /www/public_html;

    index index.php index.html index.htm;

    gzip on;
    gzip_disable "msie6";

    gzip_comp_level 6;
    gzip_min_length  1100;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types text/plain application/xml text/css text/js text/xml application/x-javascrip text/javascript application/json application/xml+rss;

    location / {
      try_files $uri $uri/ @handler;
      expires 30d;
    }

   include web_default_params;

   location ^~ /includes/           { deny all; }
   location ^~ /lib/                { deny all; }
   location ^~ /media/downloadable/ { deny all; }
   location ^~ /pkginfo/            { deny all; }
   location ^~ /report/config.xml   { deny all; }
   location ^~ /var/                { deny all; }

   location @handler {
        rewrite ^(.*) /index.php?$1 last;
   }

   location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass backend-php;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param QUERY_STRING $query_string;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_param  HTTPS off;
   }
}
4

1 回答 1

5

更改以下配置后

location @handler {
  rewrite ^(.*) /index.php?$1 last;
}

   location @handler { 
      rewrite / /index.php;
   }

并包括以下内容(## 转发路径,如 /js/index.php/x.js 到相关处理程序)

   location ~ \.php/ { 
      rewrite ^(.*\.php)/ $1 last;
   }

问题消失了

于 2013-01-17T06:47:17.387 回答