Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx (WPN-XM) and multiple Magento installations

$
0
0
How do I configure nginx to work with multiple Magento installations? I think nginx needs to be configured to dynamically change root directory, but I'm unsure how to do this or if it is even possible.

Root is now C:\server\www

I have multiple Magento installations:
C:\server\www\magento1
C:\server\www\anothermagento
C:\server\www\testmagento

Magento frontpages work fine if for example I try to access addresses:
http://localhost/magento1
http://localhost/anothermagento
http://localhost/testmagento

But if I try to access admin login page, I get Error 404:
http://localhost/magento1/admin
http://localhost/anothermagento/admin
http://localhost/testmagento/admin

Nothing works that comes after http://localhost/SOMESITEHERE/...

I know I could do something like this for each magento installation:

location @magento_handler
{
rewrite /magento1/ /magento1/index.php;
}

location /magento1/
{
index index.html index.php;
try_files $uri $uri/ @magento_handler;
}

But I would really like it if I didn't have to add own configuration for every site...

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>