On Aug 4, 2013, at 2:07 , justin wrote:

> I am using a regular expression in a server_name:
> 
>         server_name ~^(?!web2\.)(?<account>.+)\.mydomain\.com$;
> 
> In PHP, or any language for that matter, if I:
> 
>        echo $_SERVER['server_name'];
>        //~^(?!web2\.)(?.+)\.mydomain\.com$
> 
> I get the raw regular expression back. Is it possible to mask this, and
> instead return the actual regular expression matchedaccount? I.E.
> foo.mydomain.com.

You should change in your configuration the following string
fastcgi_param  SERVER_NAME        $server_name;
to
fastcgi_param  SERVER_NAME        $host;


-- 
Igor Sysoev
http://nginx.com/services.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to