User Tools

Site Tools


linux:nginx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:nginx [2025/08/11 08:49] – created srohr_adminlinux: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 of ///etc/nginx/sites-available//
-/etc/nginx/sites-available+
  
 <code> <code>
Line 31: Line 30:
 } }
 </code> </code>
 +\\
 +===== Redirect blocked IP's to different URL =====
 +
 +Use the error_page directive for this.
 +
 +<code>
 +location / {
 +    allow 198.168.0.1;
 +    deny all;
 +    error_page 403 http://www.google.com/;
 +}
 +</code>
 +
  
  
linux/nginx.1754898574.txt.gz · Last modified: 2025/08/11 08:49 by srohr_admin

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki