make nginx only listen to localhost

Igor Sysoev is at rambler-co.ru
Sat Feb 21 13:19:44 MSK 2009


On Sat, Feb 21, 2009 at 08:54:05PM +1100, Gendouki Office wrote:

> I am trying to make nginx only accessible by localhost:8080
> i have tried doing
> 
> server {
> 
> listen  127.0.0.1:8080;
> 
>         server_name  _;
> 
> ...
> 
> 
> however it still accepts requests from external ip's
> 
> 
> how can i stop this?

This should work.
Have you are server{}s in configuration ?

> i have also tried
> 
> allow 127.0.0.1;
> 
> deny all;

This should work too.

> but this seems to deny localhost as well
> 
> running latest stable 0.6


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list