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

Edho Arief me at myconan.net
Sat Jul 19 14:40:36 UTC 2014


On Sat, Jul 19, 2014 at 11:34 PM, martyparish <nginx-forum at nginx.us> wrote:
>
> actually this part was wrong;
> if (!-f $site_folder) {
> rewrite ^/[^/]+/(.*) /$1;
> }
>
> needs to be:
>
> if (!-d /etc/nginx/html/production/$site_folder) {
> rewrite ^/[^/]+/(.*) /$1;
> }
>
> * changed -f to -d
> ** had to add root path before $site_folder
>

I wonder if this works:

server {
  ...
  location ~ ^/.+(/.+) {
    try_files $uri $1;
  }
}



More information about the nginx mailing list