[QUESTION] Is possible to allow access to web server only from localhost?
pabloriera opened this issue · 2 comments
pabloriera commented
Basically, I don't want the server to be accessible from outside. Wondering if there is an easy way to set the IP like, 127.0.0.1 local only or 0.0.0.0 for any IP. Thanks
appellod commented
I'm not sure what the use-case for this is, but I'm using Mongoku behind Nginx with Basic Authentication. You can allow access by IP address, too. You would just have to create a server.whitelist
and put the following:
allow 127.0.0.1; # Allow only localhost.
deny all; # Deny everyone else.
I know you asked for this to be included in Mongoku itself, but I would instead suggest this solutioon. Nginx and other proxies are specifically designed for access control and provide tons of different features to do so.
julien-c commented
Yes I’ll second that