Advertisement
Guest User

nginx.conf

a guest
Aug 23rd, 2017
4,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4.  
  5. events {
  6. worker_connections 768;
  7. # multi_accept on;
  8. }
  9.  
  10. http {
  11. sendfile on;
  12. tcp_nopush on;
  13. tcp_nodelay on;
  14. keepalive_timeout 65;
  15. types_hash_max_size 2048;
  16. server_tokens off;
  17.  
  18. include /etc/nginx/mime.types;
  19. default_type application/octet-stream;
  20.  
  21. ##
  22. # SSL Settings
  23. ##
  24.  
  25. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  26. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA';
  27.  
  28. ssl_prefer_server_ciphers on;
  29. ssl_session_cache shared:SSL:10m;
  30. ssl_dhparam /etc/nginx/dhparam.pem;
  31.  
  32. ssl_stapling on;
  33. ssl_stapling_verify on;
  34. resolver 8.8.4.4 8.8.8.8 valid=300s;
  35. resolver_timeout 5s;
  36.  
  37. ##
  38. # Logging Settings
  39. ##
  40.  
  41. access_log /var/log/nginx/access.log;
  42. error_log /var/log/nginx/error.log;
  43.  
  44. ##
  45. # Gzip Settings
  46. ##
  47.  
  48. gzip on;
  49. gzip_disable "msie6";
  50.  
  51. gzip_vary on;
  52. gzip_proxied any;
  53. gzip_comp_level 6;
  54. gzip_buffers 16 8k;
  55. gzip_http_version 1.1;
  56. gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  57.  
  58. ## Catch all: http -> https redirect for all vhosts
  59. server {
  60. listen 80;
  61. server_name _;
  62. root /tmp;
  63.  
  64. location ~\.well-known/ {
  65. try_files $uri $uri/ =404;
  66. }
  67.  
  68. location ~ / {
  69. return 301 https://$http_host$request_uri;
  70. }
  71. }
  72.  
  73. ##
  74. # Virtual Host Configs
  75. ##
  76.  
  77. include /etc/nginx/conf.d/*.conf;
  78. include /etc/nginx/sites-enabled/*;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement