Welcome! Log In Create A New Profile

Advanced

Re: Help Required: Host name modification.

July 27, 2010 05:02AM
On Tue, Jul 27, 2010 at 10:12 AM, Sougata Pal. <skall.paul@gmail.com> wrote:
> Hi,
>
> I need to modify the hostname ( $host ) as follows.
>
> Request Hostname:  xyz.abc.example.com
>
> Required Hostname:  xyz.abc
>
> I am expecting some sort of regex function to be run on $host.
>
> Please feel free to ask questions to know more about my requirement.
server
{
server_name ~(?P<new_host>.*)\.example\.com;
location /
{
proxy_pass ...;
proxy_set_header Host $new_host;
}
}

--
Boris Dolgov.

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

Help Required: Host name modification.

Sougata Pal. July 27, 2010 02:16AM

Re: Help Required: Host name modification.

Boris Dolgov July 27, 2010 05:02AM

Re: Help Required: Host name modification.

Sougata Pal. July 27, 2010 07:32AM

Re: Help Required: Host name modification.

Maxim Dounin July 30, 2010 06:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 151
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready