Magento ver。 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;
}
}
答案 0 :(得分:5)
更改以下配置后
location @handler {
rewrite ^(.*) /index.php?$1 last;
}
到
location @handler {
rewrite / /index.php;
}
并包括以下内容 (##将/js/index.php/x.js之类的路径转发给相关的处理程序)
location ~ \.php/ {
rewrite ^(.*\.php)/ $1 last;
}
问题消失了