Magento Nginx和PHP-FPM阻止文件夹的名称中包含“PHP”
我正在使用Nginx和PHP-FPM与Magento开发一个电子商务 我有一个名为boletophp的文件夹,该站点正在尝试访问该链接:my.store/skin/boletophp/imagens/logobb.jpg,Nginx将该链接重写为my.store/skin/boletophp/ 我将文件夹名称更改为boleto,图像加载成功,但模块无法正常工作。因此,文件夹名称必须是boletophp 这是my.store配置文件:Magento Nginx和PHP-FPM阻止文件夹的名称中包含“PHP”,magento,nginx,php,Magento,Nginx,Php,我正在使用Nginx和PHP-FPM与Magento开发一个电子商务 我有一个名为boletophp的文件夹,该站点正在尝试访问该链接:my.store/skin/boletophp/imagens/logobb.jpg,Nginx将该链接重写为my.store/skin/boletophp/ 我将文件夹名称更改为boleto,图像加载成功,但模块无法正常工作。因此,文件夹名称必须是boletophp 这是my.store配置文件: server { server_name my.sto
server {
server_name my.store;
access_log /srv/www/my.store/logs/access.log;
error_log /srv/www/my.store/logs/error.log;
root /srv/www/my.store/public_html;
location / {
index index.html index.htm index.php;
try_files $uri $uri/ @handler;
}
location ~ ^/(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
location /var/export/ { internal; }
location /. { return 404; }
location @handler { rewrite / /index.php; }
location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
location ~ \.php$ {
client_max_body_size 2048M;
expires off;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/my.store/public_html$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
}
版本:
Nginx: 1.6.2
PHP: 5.6.5
Magento: 1.9.1
亲切问候,
威廉·伯坦(William Bertan)尝试更换线路:
location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
借
我希望有帮助 尝试更换线路:
location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
借
我希望有帮助 对此不确定,但请尝试将位置~*.php/{rewrite^.*.php/$1 last;}替换为位置~*\.php/{rewrite^.*.php/$1 last;}太好了!贴一个答案给我给你正确的答案!非常感谢。我毕业了,它成功了!:对此不确定,但请尝试将位置~*.php/{rewrite^.*.php/$1 last;}替换为位置~*\.php/{rewrite^.*.php/$1 last;}太好了!贴一个答案给我给你正确的答案!非常感谢。我毕业了,它成功了!: