Nginx + magento无法编辑类别



Magento ver。1.7.0.2

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

<<p> Nginx配置/em>
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;
   }
}

修改以下配置后

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

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

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

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

问题消失

最新更新