Advertisement
Guest User

nginx.conf

a guest
Apr 25th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.49 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. worker_rlimit_nofile 100000;
  4. pid /run/nginx.pid;
  5.  
  6. events {
  7.     worker_connections 4096;
  8.     multi_accept on;
  9. }
  10.  
  11. http {
  12.     ##
  13.     # EasyEngine Settings
  14.     ##
  15.  
  16.     sendfile on;
  17.     tcp_nopush on;
  18.     tcp_nodelay on;
  19.     keepalive_timeout 30;
  20.     types_hash_max_size 2048;
  21.  
  22. open_file_cache          max=10000 inactive=15m;
  23. open_file_cache_valid    5m;
  24. open_file_cache_min_uses 1;
  25. open_file_cache_errors   on;
  26.  
  27.     server_tokens off;
  28.     reset_timedout_connection on;
  29.     add_header X-Powered-By "Use Discount Voucher NERD for 10% off";
  30.     add_header rt-Fastcgi-Cache $upstream_cache_status;
  31.  
  32.     # Limit Request
  33.     limit_req_status 403;
  34.     limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
  35.  
  36.     # Proxy Settings
  37.     # set_real_ip_from  proxy-server-ip;
  38.     # real_ip_header    X-Forwarded-For;
  39.  
  40.     fastcgi_read_timeout 300;
  41.     client_max_body_size 100m;
  42.  
  43.     ##
  44.     # SSL Settings
  45.     ##
  46.  
  47.     ssl_session_cache shared:SSL:20m;
  48.     ssl_session_timeout 10m;
  49.     ssl_prefer_server_ciphers on;
  50. #   ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  51.     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
  52.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  53.     ssl_dhparam /etc/nginx/dhparams.pem;   
  54.     ##
  55.     # Basic Settings
  56.     ##
  57.     # server_names_hash_bucket_size 64;
  58.     # server_name_in_redirect off;
  59.  
  60.     include /etc/nginx/mime.types;
  61.     default_type application/octet-stream;
  62.  
  63.     ##
  64.     # Logging Settings
  65.     ##
  66.  
  67.     access_log /var/log/nginx/access.log;
  68.     error_log /var/log/nginx/error.log;
  69.  
  70.     # Log format Settings
  71.     log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
  72.     '$http_host "$request" $status $body_bytes_sent '
  73.     '"$http_referer" "$http_user_agent"';
  74.  
  75.     ##
  76.     # Gzip Settings
  77.     ##
  78.  
  79.     gzip on;
  80.     gzip_disable "msie6";
  81.  
  82.     gzip_vary on;
  83.     gzip_proxied any;
  84.     gzip_comp_level 6;
  85.     gzip_buffers 16 8k;
  86.     gzip_http_version 1.1;
  87.     gzip_types
  88.         application/atom+xml
  89.         application/javascript
  90.         application/json
  91.         application/rss+xml
  92.         application/vnd.ms-fontobject
  93.         application/x-font-ttf
  94.         application/x-web-app-manifest+json
  95.         application/xhtml+xml
  96.         application/xml
  97.         font/opentype
  98.         image/svg+xml
  99.         image/x-icon
  100.         text/css
  101.         text/plain
  102.         text/x-component
  103.         text/xml
  104.         text/javascript;
  105.  
  106.     ##
  107.     # Virtual Host Configs
  108.     ##
  109.  
  110.     include /etc/nginx/conf.d/*.conf;
  111.     include /etc/nginx/sites-enabled/*;
  112. }
  113.  
  114.  
  115. #mail {
  116. #   # See sample authentication script at:
  117. #   # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  118. #
  119. #   # auth_http localhost/auth.php;
  120. #   # pop3_capabilities "TOP" "USER";
  121. #   # imap_capabilities "IMAP4rev1" "UIDPLUS";
  122. #
  123. #   server {
  124. #       listen     localhost:110;
  125. #       protocol   pop3;
  126. #       proxy      on;
  127. #   }
  128. #
  129. #   server {
  130. #       listen     localhost:143;
  131. #       protocol   imap;
  132. #       proxy      on;
  133. #   }
  134. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement