Setting root based on Host: header

Samuel Vogel samydelux at gmail.com
Mon Oct 20 15:58:17 MSD 2008


Am 19.10.2008 23:38 Uhr, Maxim Dounin schrieb:
> Something like:
>
>      set $subdir "default";
>
>      if ($host ~ "^(.+)\.user\.domain\.net$") {
>          set $subdir $1;
>      }
>
>      root /www/$subdir;
>
> should work
Thanks!

Regards,
Samy





More information about the nginx mailing list