Welcome! Log In Create A New Profile

Advanced

Re: Default_server catch all block not working

Jonathan Matthews
March 28, 2012 12:12PM
On 22 March 2012 16:32, lockev3.0 <nginx-forum@nginx.us> wrote:
> At last I got it ! Well, to be honest I will say Maxim Dounim helped me
> thru my logs. In the end it was so simple ::: My load balancer in front
> of my Nginx's always looked thru IP so no host name ever matched any of
> my server_name's. Solution simple :: Do the balancer refer to nodes thru
> a locally resolved hostname also put as a new server_name.
> ...........simple like crazyness when it comes.
>
> The thing now is I have following block and it works quite right. But If
> I mean to use the commented return 444 instead of the rewrite ==> al my
> web  start returning 503 !!! and nothing's functioning .......always the
> strange things to me.
>
> server {
>        listen 80 default_server;
>        server_name  _;
>        error_log       /var/log/nginx/000default-error.log error;
>        location / {
>                proxy_set_header Host $host;
>                rewrite .* http://somewherelse.net permanent;
>                #return 444;
>        }
> }


Er, WTF?

You use the non-standard 444 ("444 closes the connection without
sending any headers") and you expect your downstream to do something
with that *other* than correctly respond to requests with a 503
Service Unavailable?

What you describe is *exactly* what I'd expect to see.

Either your understanding/expectations are faulty, or you haven't
explained yourself correctly.

Jonathan

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

Default_server catch all block not working

lockev3.0 January 24, 2012 10:26AM

Re: Default_server catch all block not working

António P. P. Almeida January 24, 2012 10:36AM

Re: Default_server catch all block not working

Mit Rowe January 24, 2012 11:52AM

Re: Default_server catch all block not working

lockev3.0 January 24, 2012 12:57PM

Re: Default_server catch all block not working

lockev3.0 February 02, 2012 07:10AM

Re: Default_server catch all block not working

António P. P. Almeida January 24, 2012 02:52PM

Re: Default_server catch all block not working

lockev3.0 January 25, 2012 09:50AM

Re: Default_server catch all block not working

lockev3.0 January 25, 2012 10:39AM

Re: Default_server catch all block not working

lockev3.0 February 01, 2012 06:32AM

Re: Default_server catch all block not working

António P. P. Almeida January 25, 2012 11:18AM

Re: Default_server catch all block not working

lockev3.0 March 22, 2012 12:32PM

Re: Default_server catch all block not working

lockev3.0 March 28, 2012 04:11AM

Re: Default_server catch all block not working

Jonathan Matthews March 28, 2012 12:12PM

Re: Default_server catch all block not working

lockev3.0 April 16, 2012 04:43AM

Re: Default_server catch all block not working

Maxim Dounin April 19, 2012 08:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready