Re: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Kaushal Shriyan
On Fri, Feb 28, 2020 at 9:08 PM Reinis Rozitis wrote: > > I did follow your steps. My nginx.conf file is > https://paste.centos.org/view/ae22889e when I run the curl call, I am > still receiving HTTP 200 OK response instead of HTTP 444 (No Response) as > per the below output > > If you've just ca

RE: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Reinis Rozitis
> I did follow your steps. My nginx.conf file is > https://paste.centos.org/view/ae22889e when I run the curl call, I am still > receiving HTTP 200 OK response instead of HTTP 444 (No Response) as per the > below output If you've just called config reload then most likely your nginx is still us

Re: Does nginx support multiple http {} blocks?

2020-02-28 Thread Francis Daly
On Fri, Feb 28, 2020 at 10:22:21PM +0800, 2535191782 wrote: Hi there, > In nginx.conf:http{ > > > } > http{ > > > } > can be allowed? It seems fairly easy to check. $ sbin/nginx -t nginx: [emerg] "http" directive is duplicate in /usr/local/nginx/conf/nginx.conf:8 nginx: configuration file

Does nginx support multiple http {} blocks?

2020-02-28 Thread 2535191782
In nginx.conf:http{ } http{ } can be allowed?___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Kaushal Shriyan
On Fri, Feb 28, 2020 at 2:29 PM Reinis Rozitis wrote: > > So either place it as first or add listen 443 default_server; > > By first I mean the "catch all" server { server_name _; .. } block. > > rr > > ___ > nginx mailing list > nginx@nginx.org > http

RE: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Reinis Rozitis
> So either place it as first or add listen 443 default_server; By first I mean the "catch all" server { server_name _; .. } block. rr ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

RE: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Reinis Rozitis
> I have added the below server block https://paste.centos.org/view/0c6f3195 > > It is still not working. I look forward to hearing from you and your help is > highly appreciated. Thanks in Advance. If you don't use the default_server for the catch all server{} block then you should place it a

Re: Prevent Arbitary HTTP Host header in nginx

2020-02-28 Thread Kaushal Shriyan
On Fri, Feb 28, 2020 at 1:23 PM Reinis Rozitis wrote: > > I have added the below server block in /etc/nginx/nginx.conf ( > https://paste.centos.org/view/raw/d5e90b98) > > > > server { > > listen 80; > >server_name _; > >return 444; > > } > > > > When i try to run the below