From a39f8f8507631cdd6addcff9f2d82ce681a7201f Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 4 Jan 2019 05:14:16 -0700 Subject: [PATCH] reset default-type so default action is download added real-ip addresses and sed-replace tag --- etc/nginx/nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index aed1455..2e5609b 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -19,7 +19,7 @@ events { http { server_names_hash_bucket_size 64; - default_type text/plain; + default_type application/octet-stream; charset utf-8; include /etc/nginx/mime.types; @@ -32,7 +32,7 @@ http { # set default document root for all sites root /usr/share/nginx/html; - + # logging options log_format main '$remote_addr - $remote_user [$time_local] $request ' '$status $body_bytes_sent "$http_referer" ' @@ -49,6 +49,10 @@ http { access_log off; server_tokens off; + set_real_ip_from 127.0.0.1; + set_real_ip_from ; + real_ip_header X-Forwarded-For; + real_ip_recursive on; # include enabled server blocks from /etc/nginx/enabledSites/*.conf include /etc/nginx/enabledSites/*.conf;