Re[2]: server name rewrite

2013-06-19 Thread wishmaster
Thank you Francis, your answer is exhaustive, as always. --- Original message --- From: "Francis Daly" Date: 20 June 2013, 00:27:48 > On Wed, Jun 19, 2013 at 09:22:11PM +0300, wishmaster wrote: > > Hi there, > > > From http://wiki.nginx.org/Pitfalls I use two server's {} directives for

Re: server name rewrite

2013-06-19 Thread Francis Daly
On Wed, Jun 19, 2013 at 09:22:11PM +0300, wishmaster wrote: Hi there, > From http://wiki.nginx.org/Pitfalls I use two server's {} directives for this > instead if(). > But this doesn't work and first server {} directive MUST have listen > directive as well. http://nginx.org/en/docs/http/reque

server name rewrite

2013-06-19 Thread wishmaster
Hi, guys! E.g. I have server new_server_name.com and want to rewrite requests to www.new_server_name.com and old_server_name.com to present server. >From http://wiki.nginx.org/Pitfalls I use two server's {} directives for this >instead if(). server { server_name www.new_server_name.com old_se