【发布时间】:2015-10-03 22:52:45
【问题描述】:
这是我的主机文件:
server {
root /path/to/root/domain/html;
index index.php;
server_name servername.de;
location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}
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$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_TYPE store;
include fastcgi_params;
}
}
我已将 Magento 管理面板中的“使用 Web 服务器重写”更改为“是”,以使 Urls SEO 友好(没有 index.php)。重新启动 nginx 后,我已经从管理面板清除了 magento 缓存。 谁能帮我找出 nginx 配置正确或为什么会出现此错误。
【问题讨论】:
标签: php magento nginx plesk hhvm