Advertisement
RedFoxy

nginx.conf

Mar 24th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.85 KB | None | 0 0
  1. user                  web;
  2. worker_processes      8;  # 1 per cpu
  3.  
  4.  
  5. worker_rlimit_nofile  1024; #20000; 15/09/2015
  6.  
  7. error_log             /home/web/log/nginx/_nginx/sys_error.log debug;
  8. #pid                  /var/run/nginx.pid;
  9.  
  10. #google_perftools_profiles  /tmp/google_perftools/;
  11.  
  12. events
  13. {
  14.   worker_connections  15000; #4096; #15000; 15/09/2015
  15.   multi_accept on;
  16.   use kqueue;    #solo su FreeBSD e Linux 2.6
  17. }
  18.  
  19. http
  20. {
  21. # include  /home/serverweb/etc/nginx/cloudflare-ip.conf;
  22. # include  /home/serverweb/etc/nginx/incapsula-ip.conf;
  23.   include  /home/serverweb/etc/nginx/mime.types;
  24.  
  25. # log_format main  '$remote_addr - $remote_user [$time_local] "$request" '
  26. #                  '$status $body_bytes_sent "$http_referer" '
  27. #                  '"$http_user_agent" "$http_x_forwarded_for"';
  28.  
  29. log_format rt_cache '$remote_addr - $upstream_cache_status [$time_local]  '
  30.                     '"$request" $status $body_bytes_sent '
  31.                     '"$http_referer" "$http_user_agent"';
  32.  
  33. # access_log  /home/web/log/nginx/_nginx/access.log;    # Log accessi al sito di default
  34.   access_log  off;
  35.   error_log   /home/web/log/nginx/_nginx/error.log warn;  # Log errori al sito di default
  36.  
  37. #fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=cache_zone:100m inactive=60m;
  38. #fastcgi_cache_key  "$scheme$request_method$host$request_uri";
  39. #fastcgi_cache_use_stale error timeout invalid_header http_500;
  40. #fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
  41. #add_header rt-Fastcgi-Cache $upstream_cache_status;
  42.  
  43. #add_header Content-Security-Policy "default-src 'self' https://*.google-analytics.com https://*.googleapis.com https://*.gstatic.com https://*.gravatar.com https://*.w.org; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ssl.google-analytics.com https://connect.facebook.net; img-src 'self' https://ssl.google-analytics.com https://s-static.ak.facebook.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://themes.googleusercontent.com; frame-src https:// https://www.facebook.com https://s-static.ak.facebook.com; object-src 'none'";
  44. #  add_header X-Xss-Protection "1; mode=block" always;
  45. #  add_header X-Frame-Options "SAMEORIGIN" always;
  46. #  add_header X-Content-Type-Options "nosniff" always;
  47.  
  48.   client_max_body_size    50M;  #20M; #15/09/2015
  49.   client_body_buffer_size 1m;   #20M; #15/09/2015
  50.   client_body_timeout     15;         #15/09/2015
  51.   client_header_timeout   15;         #15/09/2015
  52.   keepalive_timeout       2 2;         #15/09/2015
  53.   send_timeout            15;         #15/09/2015
  54.   sendfile                on;
  55.   tcp_nopush              on;
  56.   tcp_nodelay             on;
  57.  
  58.   gzip on;
  59.   gzip_vary on;
  60.   gzip_proxied any;
  61.   gzip_comp_level 6;
  62.   gzip_min_length 1100;
  63.   gzip_buffers 16 8k;
  64.   gzip_http_version 1.1;
  65.   gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  66.   gzip_disable "msie6";
  67.  
  68. #  gzip_min_length 1024;
  69. #  gzip_buffers    4 8k;
  70. #  gzip_disable    "MSIE [1-6]\.(?!.*SV1)";
  71.  
  72.   open_file_cache          max=2000 inactive=20s;
  73.   open_file_cache_valid    60s;
  74.   open_file_cache_min_uses 5;
  75.   open_file_cache_errors   off;
  76.  
  77.   server_tokens    off; # Non mostrare la versione di Nginx
  78.  
  79.   server_names_hash_bucket_size    100;         #15/09/2015
  80.  
  81.   charset          utf-8;
  82.   ssi              on;
  83.   ssi_value_length 1024;
  84.  
  85.   upstream backend {
  86.     server unix:/tmp/php-fpm.php0.sock;
  87.     server unix:/tmp/php-fpm.php1.sock;
  88.     server unix:/tmp/php-fpm.php2.sock;
  89.     server unix:/tmp/php-fpm.php3.sock;
  90.     server unix:/tmp/php-fpm.php4.sock;
  91.     server unix:/tmp/php-fpm.php5.sock;
  92.     server unix:/tmp/php-fpm.php6.sock;
  93.     server unix:/tmp/php-fpm.php7.sock;
  94.   }
  95.  
  96. #  include  /home/serverweb/etc/nginx/_conf/manutenzione.conf;
  97.   include  /home/web/conf_nginx/*.conf;
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement