How can I allow access to a single IP address via Nginx.conf?
modify your nginx.conf
server {
listen 80;
server_name www.foo.bar;
location / {
root /path/to/rails/public/;
passenger_enabled on;
allow my.public.ip.here;
deny all;
}
}
I know this is an old tread, but you an always use sudo nginx -t
to get a more specific error message.