nginx:restrict_nginx_to_the_private_network
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
nginx:restrict_nginx_to_the_private_network [2020/07/26 23:50] – old revision restored (2016/10/07 16:59) 192.99.15.29 | nginx:restrict_nginx_to_the_private_network [2020/07/26 23:50] (current) – old revision restored (2016/10/07 17:00) 192.99.15.29 | ||
---|---|---|---|
Line 20: | Line 20: | ||
In our example, we'd modify the listen directives to look like this: | In our example, we'd modify the listen directives to look like this: | ||
- | / | + | < |
server { | server { | ||
listen 192.0.2.2: | listen 192.0.2.2: | ||
Line 26: | Line 26: | ||
. . . | . . . | ||
} | } | ||
+ | </ | ||
+ | |||
Save and close the file when you are finished. Test the file for syntax errors by typing: | Save and close the file when you are finished. Test the file for syntax errors by typing: | ||
+ | <code bash> | ||
sudo nginx -t | sudo nginx -t | ||
+ | </ | ||
+ | |||
If no errors are shown, restart Nginx to enable the new configuration: | If no errors are shown, restart Nginx to enable the new configuration: | ||
+ | <code bash> | ||
sudo service nginx restart | sudo service nginx restart | ||
+ | </ | ||
+ |
nginx/restrict_nginx_to_the_private_network.1595807427.txt.gz · Last modified: 2020/07/26 23:50 by 192.99.15.29