Advertisement
Guest User

Untitled

a guest
May 8th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 4.64 KB | None | 0 0
  1. user abc;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules/*.conf;
  5.  
  6. events {
  7.         worker_connections 40960; #Open file limit per core. Run  "ulimit -n" in terminal for YOUR correct number.
  8. }
  9.  
  10. http {
  11.         #GEO BLOCK
  12.         include /config/nginx/geoblocksites.conf;
  13.  
  14.         #CACHE STATIC CONTENT
  15.         #include /config/nginx/cache.conf;
  16.  
  17.         #CF Real IP
  18.         include /config/nginx/cf_real-ip.conf;
  19.         real_ip_header X-Forwarded-For;
  20.  
  21.         ##
  22.         # Basic Settings
  23.         ##
  24.  
  25.         # Real docker ip! [Allready set in CF Real IP]
  26.         #real_ip_header X-Forwarded-For;
  27.         #set_real_ip_from 172.18.0.0/16;
  28.         #real_ip_recursive on;
  29.  
  30.         ## Tuning - Buffers & Timeouts
  31.         ## Buffer size for POST submissions
  32.         client_body_buffer_size 512K;
  33.         client_max_body_size 0;
  34.  
  35.         # Buffer size for Headers
  36.         client_header_buffer_size 1k;
  37.  
  38.         # Max time to receive client headers/body
  39.         client_body_timeout 12;
  40.         client_header_timeout 12;
  41.  
  42.         # Skip buffering for static files
  43.         sendfile on;
  44.  
  45.         # Optimise sendfile packets
  46.         tcp_nopush on;
  47.         tcp_nodelay on;
  48.  
  49.         # Max time to keep a connection open for
  50.         keepalive_timeout 20;
  51.  
  52.         types_hash_max_size 2048;
  53.         # server_tokens off;
  54.  
  55.         # Max time for the client accept/receive a response
  56.         send_timeout 10;
  57.  
  58.         server_names_hash_bucket_size 128;
  59.         # server_name_in_redirect off;
  60.  
  61.         variables_hash_max_size 2048;
  62.         variables_hash_bucket_size 64;
  63.  
  64.         proxy_headers_hash_max_size 1024;
  65.         proxy_headers_hash_bucket_size 128;
  66.  
  67.         include /etc/nginx/mime.types;
  68.         default_type application/octet-stream;
  69.  
  70.         ##
  71.         # Logging Settings
  72.         ##
  73.  
  74.         access_log /config/log/nginx/access.log;
  75.         error_log /config/log/nginx/error.log;
  76.  
  77.         ##
  78.         # Gzip Settings
  79.         ##
  80.  
  81.         gzip on;
  82.         gzip_disable "msie6";
  83.  
  84.         gzip_vary on;
  85.         gzip_proxied any;
  86.         gzip_comp_level 6;
  87.         gzip_buffers 16 8k;
  88.         gzip_http_version 1.1;
  89.         gzip_min_length 256;
  90.         gzip_types
  91.                 text/plain
  92.                 text/css
  93.                 text/xml
  94.                 text/javascript
  95.                 text/x-component
  96.                 application/json
  97.                 application/x-javascript
  98.                 application/xml
  99.                 application/xml+rss
  100.                 application/xhtml+xml
  101.                 application/javascript
  102.                 application/vnd.ms-fontobject
  103.                 application/x-font-truetype
  104.                 application/x-web-app-manifest+json
  105.                 application/x-font-ttf
  106.                 application/x-font-opentype
  107.                 font/opentype
  108.                 font/eot
  109.                 font/otf
  110.                 image/svg+xml
  111.                 image/vnd.microsoft.icon
  112.                 image/x-icon;
  113.  
  114.         ##
  115.         # nginx-naxsi config
  116.         ##
  117.         # Uncomment it if you installed nginx-naxsi
  118.         ##
  119.  
  120.         #include /etc/nginx/naxsi_core.rules;
  121.  
  122.  
  123.         ##
  124.         # nginx-passenger config
  125.         ##
  126.         # Uncomment it if you installed nginx-passenger
  127.         ##
  128.  
  129.         #passenger_root /usr;
  130.         #passenger_ruby /usr/bin/ruby;
  131.  
  132.         ##
  133.         # Virtual Host Configs
  134.         ##
  135.         include /etc/nginx/conf.d/*.conf;
  136.         include /config/nginx/site-confs/*;
  137.  
  138.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  139.         ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  140.         ssl_prefer_server_ciphers on;
  141.         ssl_session_cache shared:SSL:40m;
  142.         ssl_stapling on; # Requires nginx >= 1.3.7
  143.         ssl_stapling_verify on; # Requires nginx => 1.3.7
  144.  
  145.         #add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;";
  146.         #add_header X-Frame-Options SAMEORIGIN;
  147.         add_header X-Content-Type-Options nosniff;
  148.         add_header X-XSS-Protection "1; mode=block";
  149.         add_header X-Robots-Tag none;
  150. }
  151.  
  152.  
  153. #mail {
  154. #       # See sample authentication script at:
  155. #       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  156. #
  157. #       # auth_http localhost/auth.php;
  158. #       # pop3_capabilities "TOP" "USER";
  159. #       # imap_capabilities "IMAP4rev1" "UIDPLUS";
  160. #
  161. #       server {
  162. #               listen     localhost:110;
  163. #               protocol   pop3;
  164. #               proxy      on;
  165. #       }
  166. #
  167. #       server {
  168. #               listen     localhost:143;
  169. #               protocol   imap;
  170. #               proxy      on;
  171. #       }
  172. #}
  173. daemon off;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement