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...
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...