Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

NGINX Multiple Stores in subfolders
 
marklehm
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2011-05-06
 

We are having an issue with the stores that in subfolders from the base installation. Separate domains is working just fine.

Example:

/home/store/public_html/
/home/store/public_html/us/
/home/store/public_html/eu/

Has anyone run into this? Can you share you nginx rewrite for this?

We normally use what is in the wiki\\\’s

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

The only problem we are having is product pages and cms pages need index.php ex domain.com/us/index.php/product-name/

If we add

location /us/ {
rewrite /us/ /us/index.php;
}

The pages work, but the CSS isn\\\’t accessible. JS is however.

Help please.

 
Magento Community Magento Community
Magento Community
Magento Community
 
marklehm
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2011-05-06
 

Solved!

Change /us/ to the path of you magento subfolder.

location /us/ {
index index.php;
if (!-e $request_filename) {
rewrite . /us/index.php last;
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roger
Member
 
Total Posts:  69
Joined:  2007-08-31
 

Thank you so much for writing the answer to your own question Voonda!

It helped me a lot!

 
Magento Community Magento Community
Magento Community
Magento Community
 
pbscreative
Jr. Member
 
Total Posts:  1
Joined:  2012-08-15
 

Yes - thanks very much.

I was trying to figure out how to make the rewriting work on my second store in nginx and this did the trick nicely.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top