linux:nginx
Differences
This shows you the differences between two versions of the page.
| linux:nginx [2025/08/11 08:49] – created srohr_admin | linux:nginx [2025/08/11 08:52] (current) – srohr_admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Nginx ====== | ====== Nginx ====== | ||
| + | \\ | ||
| ===== Whitelist certain IP's ===== | ===== Whitelist certain IP's ===== | ||
| - | Add the following directives with your desire IP inside the server section.\\ | + | Add the following directives with your desire IP inside the server section |
| - | / | + | |
| < | < | ||
| Line 31: | Line 30: | ||
| } | } | ||
| </ | </ | ||
| + | \\ | ||
| + | ===== Redirect blocked IP's to different URL ===== | ||
| + | |||
| + | Use the error_page directive for this. | ||
| + | |||
| + | < | ||
| + | location / { | ||
| + | allow 198.168.0.1; | ||
| + | deny all; | ||
| + | error_page 403 http:// | ||
| + | } | ||
| + | </ | ||
| + | |||
linux/nginx.1754898574.txt.gz · Last modified: 2025/08/11 08:49 by srohr_admin
