Welcome! Log In Create A New Profile

Advanced

Re: Multiple sites under same domain with one app codebase

July 18, 2014 11:17AM
Thanks Francis!

Sorry for not being clear enough.

My code base is at:

/etc/nginx/html/production/

The "site1, site2, etc..." folders do not exists at all. They are only seen and used in the public URLs.

The original config I posted in the first post works, I just don't like it because there will be hundreds of "sitesX". It is using a location block with rewrite for each site.

so, if I request

domain.com/site1/index.php

The file that is served is

/etc/nginx/html/production/index.php (not /etc/nginx/html/production/site1/index.php)

Same for ALL sites. PHP processed the /site1/ path and loads the configuration for that particular site.

So, really nothing is "broken", it is just going to be extremely ugly and possibly slow to process 200+ location blocks.

I'd like to use a location regex that could handle ALL sites in one location block if possible.

Or, I was thinking "map" may work but not sure how I could configure it.

Thanks again for the help and let me know if this makes it more clear.


Marty
Subject Author Posted

Multiple sites under same domain with one app codebase

martyparish July 18, 2014 09:40AM

Re: Multiple sites under same domain with one app codebase

martyparish July 18, 2014 09:53AM

Re: Multiple sites under same domain with one app codebase

Francis Daly July 18, 2014 10:52AM

Re: Multiple sites under same domain with one app codebase

martyparish July 18, 2014 11:17AM

Re: Multiple sites under same domain with one app codebase

itpp2012 July 18, 2014 11:50AM

Re: Multiple sites under same domain with one app codebase

martyparish July 18, 2014 12:08PM

Re: Multiple sites under same domain with one app codebase

martyparish July 18, 2014 12:23PM

Re: Multiple sites under same domain with one app codebase

itpp2012 July 18, 2014 01:12PM

Re: Multiple sites under same domain with one app codebase

martyparish July 18, 2014 01:21PM

Re: Multiple sites under same domain with one app codebase

itpp2012 July 18, 2014 02:21PM

[SOLVED] Re: Multiple sites under same domain with one app codebase

martyparish July 19, 2014 10:32AM

Re: [SOLVED] Re: Multiple sites under same domain with one app codebase

martyparish July 19, 2014 10:34AM

Re: [SOLVED] Re: Multiple sites under same domain with one app codebase

Edho Arief July 19, 2014 10:42AM

Re: [SOLVED] Re: Multiple sites under same domain with one app codebase

martyparish July 19, 2014 10:51AM

Re: [SOLVED] Re: Multiple sites under same domain with one app codebase

Edho Arief July 19, 2014 10:58AM

Re: [SOLVED] Re: Multiple sites under same domain with one app codebase

martyparish July 20, 2014 02:03PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready