Skip to Content
πŸ“ NotesπŸ’» DeploymentLinuxNginxBasic - Whitelist Setting

White list setup

Nginx Whitelist Setting for blocking all IPs (Allow registed IP only)

Step 1: Settings

Goto /etc/nginx/sites-available/default

CLI
sudo nano /etc/nginx/sites-available/default

Step 2: Add your ip as following

/etc/nginx/sites-available/default
server{ listen 80; server_name api.r48n34.me; # Sub domain name location / { proxy_pass http://localhost:8085; # Add your ip allow 12.33.133.12; allow 122.31.2.122; deny all; } }

Step 3: Restart services

sudo nginx -t sudo service nginx restart
Last updated on