This guide will show you how to whitelist your GoodAccess IP address in NGINX.

Step 1

Open the NGINX configuration file

If you are using NGINX’s main configuration file nginx.conf without virtual hosts, run the following command

sudo vi /etc/nginx/nginx.conf

If you have configured separate virtual hosts for your website (e.g., such as /etc/nginx/sites-enabled/example.conf then open its configuration with the following command

sudo vi /etc/nginx/sites-enabled/example.conf

Step 2

There are multiple ways to whitelist an IP in NGINX. We will look at each one. If you want to whitelist the IP for a domain or your entire website, you can add the following lines in your configuration file.

deny all;

The above lines will make NGINX deny all IPs except The first line allow will allow access from that IP, deny all will block all other IPs.


Last updated