Welcome! Log In Create A New Profile


rewrite question - magento in subfolder

January 21, 2010 03:05AM
I've just started trying to get a site of mine switched over to nginx, and have enjoyed it so far but I've come up against a rewrite issue I haven't been able to solve easily. We're running an instance of magento at the location mysite.com/magento. I've followed the nice example at http://seconddrawer.com.au/blog/2010/01/14/simple-nginx-config-for-magento, although I haven't been able to adjust it to work in a subfolder.

I've tried to modify the main location directive, such that it looks like
location /magento {
rewrite /magento(/index.php)?(.*) /$1 break;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/webapps/magento/index.php$1;

as well as a few variations on that, but with debug output on I've seen that it only seems to modify the document_uri, not the request_uri, such that document_uri is "/" while request_uri remains "/magento". I realize I must be missing something simple, but can anybody give any pointers on how to remove the leading "/magento" from the request_uri as well?

nginx 0.7.64, ubuntu 9.10
Subject Author Posted

rewrite question - magento in subfolder

liamstask January 21, 2010 03:05AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready