Answers for "secure nginx server"

0

secure nginx server

TIP #1: Keep Nginx up to date
... Install Latest Stable Version of Nginx from Repositories and Source
TIP #2: Remove Unnecessary Modules in Nginx
for example
# ./configure  --without-http_dav_module --withouthttp_spdy_module 
TIP #3: Disable server_tokens Directive in Nginx
To disable the server_tokens directive, set if to off inside a server block:
server {
    listen       192.168.0.25:80;
    server_tokens        off;
    index  index.html index.htm;
    }
TIP #4: Disable Unwanted HTTP Methods in Nginx Server Block
if ($request_method !~ ^(GET|HEAD|POST)$) {
   return 444;
}
TIP #4: Limit the Number of Connections by IP in Nginx
limit_conn addr 1;
Posted by: Guest on September-27-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language