Advertisement
poiuty

anilibria_nginx_cache.conf

Nov 5th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules-enabled/*.conf;
  5. worker_rlimit_nofile 65535;
  6.  
  7. events {
  8. worker_connections 32768;
  9. accept_mutex off;
  10. use epoll;
  11. }
  12.  
  13. http {
  14.  
  15. ##
  16. # Basic Settings
  17. ##
  18.  
  19. sendfile on;
  20. tcp_nopush on;
  21. tcp_nodelay on;
  22. keepalive_timeout 30;
  23. server_tokens off;
  24.  
  25. include /etc/nginx/mime.types;
  26. default_type application/octet-stream;
  27.  
  28. ##
  29. # Logging Settings
  30. ##
  31.  
  32. access_log off;
  33. error_log /var/log/nginx/error.log error;
  34.  
  35. ##
  36. # Gzip Settings
  37. ##
  38.  
  39. gzip on;
  40. gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  41.  
  42. ##
  43. # SSL Settings
  44. ##
  45.  
  46. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  47. ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
  48. ssl_prefer_server_ciphers on;
  49. ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA512:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:DH+AESGCM:DH+AES256:RSA+AESGCM:!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;
  50. ssl_session_cache shared:TLS:128m;
  51.  
  52. ##
  53. # Cache Settings
  54. ##
  55.  
  56. proxy_cache_path /var/www/cache levels=1:2 keys_zone=STATIC:50m inactive=90d max_size=1000g;
  57.  
  58. log_format cache '$remote_addr - $host [$time_local] "$request" $status '
  59. '$body_bytes_sent "$http_referer" '
  60. 'rt=$request_time ut="$upstream_response_time" '
  61. 'cs=$upstream_cache_status';
  62.  
  63. include /etc/nginx/conf.d/*.conf;
  64. include /etc/nginx/sites-enabled/*;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement