Re: Site should not be accessed through IP

2015-04-09 Thread FinalX
You could use an extra host config with a default_server, like so:

server {
listen   80  default_server;
server_name  _;
return   444;
}

You can find this example on http://nginx.org/en/docs/http/server_names.html

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,257927,257928#msg-257928

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Site should not be accessed through IP

2015-04-09 Thread blason
Hi Finalx,

you mean shall I create the .conf file by name default_server and add up
this there? Or would you please tell me where shoudl I add the above stanza?
Sorry I am being novice in nginx just would like to know more information
about this.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,257927,257930#msg-257930

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Site should not be accessed through IP

2015-04-09 Thread Sebastian Stabbert
configure a site first, which does the „default“ handling and has no content?


Cheers,
Sebastian


Am 09.04.2015 um 20:09 schrieb blason nginx-fo...@nginx.us:

 Hi Guys,
 
 I have my nginx box deployed as a reverse proxy serving almost more than 10
 sites. But when I browse through 1 IP the first site configured gets
 accessed. I dont want anyone to access the sites through IP, by using only
 FQDN sites should be accesible.
 
 So anyone trying to access the site using IP should recieve a host not found
 or may be error like COnnection reset.
 
 Can we do that in nginx?
 
 Posted at Nginx Forum: 
 http://forum.nginx.org/read.php?2,257927,257927#msg-257927
 
 ___
 nginx mailing list
 nginx@nginx.org
 http://mailman.nginx.org/mailman/listinfo/nginx
 

-- 
Sebastian Stabbert
Systemadministrator

Host Europe GmbH is a company of HEG

Telefon: +49 2203 1045-7362

---
Host Europe GmbH - http://www.hosteurope.de
Welserstraße 14 - 51149 Köln - Germany
HRB 28495 Amtsgericht Köln
Geschäftsführer: Tobias Mohr, Patrick Pulvermüller



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx