Welcome! Log In Create A New Profile

Advanced

Nginx (WPN-XM) and multiple Magento installations

Posted by Vopletti 
Nginx (WPN-XM) and multiple Magento installations
October 15, 2015 04:26AM
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...
Re: Nginx (WPN-XM) and multiple Magento installations
October 15, 2015 08:01AM
You can set/change 'root' for each server or location block.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 108
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready