Welcome! Log In Create A New Profile

Advanced

Re: 400 bad request errors

October 08, 2009 10:26AM
On Thu, Oct 08, 2009 at 09:59:51AM -0400, pepejose wrote:

> cdan18po Wrote:
> -------------------------------------------------------
> > everything is now working verysmoothly
> > now...thanks for the great help you gave...
> > thanks
>
> WTF?!
>
> with this:
>
> server {
> listen *:80;
> server_name _ ""; #default
> return 444;
> }
>
> and "telnet host port" + "Ctrl-D"
>
> I can not catch requests without host header
>
> I also read this thread which speaks about http://marc.info/?l=nginx&m=121991334206140&w=2

'server_name _ "";' does not make the server default.
You have to set default server for listen pair:

server {
- listen *:80;
+ listen *:80 default;
server_name _ "";
return 444;
}

However, if nginx has got empty request it will not run "return 444",
you will see 400 in access_log.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

400 bad request errors

pepejose September 28, 2009 10:07AM

Re: 400 bad request errors

Maxim Dounin September 28, 2009 10:30AM

Re: 400 bad request errors

Ray September 28, 2009 10:40AM

Re: 400 bad request errors

pepejose September 28, 2009 10:44AM

Re: 400 bad request errors

Maxim Dounin September 28, 2009 10:56AM

Re: 400 bad request errors

pepejose September 28, 2009 11:02AM

Re: 400 bad request errors

pepejose October 01, 2009 04:13AM

Re: 400 bad request errors

pepejose October 06, 2009 10:19AM

Re: 400 bad request errors

Igor Sysoev October 06, 2009 10:44AM

Re: 400 bad request errors

pepejose October 06, 2009 10:56AM

Re: 400 bad request errors

pepejose October 06, 2009 11:12AM

Re: 400 bad request errors

Igor Sysoev October 06, 2009 11:20AM

Re: 400 bad request errors

pepejose October 06, 2009 11:53AM

Re: 400 bad request errors

Igor Sysoev October 06, 2009 12:50PM

Re: 400 bad request errors

pepejose October 06, 2009 01:08PM

Re: 400 bad request errors

pepejose October 07, 2009 10:57AM

Re: 400 bad request errors

Igor Sysoev October 07, 2009 11:20AM

Re: 400 bad request errors

cdan18po October 08, 2009 02:35AM

Re: 400 bad request errors

pepejose October 08, 2009 09:59AM

Re: 400 bad request errors

Igor Sysoev October 08, 2009 10:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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