Welcome! Log In Create A New Profile

Advanced

Re: Multiple sites under same domain with one app codebase

July 18, 2014 12:23PM
Okay, I finally got the mapped variable figured out!

map $uri $site_folder {
~^/(?P<folder>[a-zA-Z]+)/.* $folder ;
}

Now, I just need to figure out how to use it in the location block???

This is what I am trying:

location ^~ /$site_folder/ {
#rewrite ^/$site_folder/(.*) /$1;
}


Is it okay to use the named variable in the location like that? It's not picking it up...

If I use this:

location ^~ / {
return 301 $scheme://www.google.com?q=$site_folder;
}

It DOES redirect to google with the proper variable in there.
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: 296
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