Advertisement
kazeuraki

kazeuraki.net Conf

Mar 28th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. server {
  2. listen 443 ssl http2;
  3. server_name www.kazeuraki.net;
  4.  
  5. # SSL
  6. ssl_certificate /etc/letsencrypt/live/kazeuraki.net/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/kazeuraki.net/privkey.pem;
  8. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  9. ssl_prefer_server_ciphers on;
  10. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  11.  
  12. rewrite ^(.*) https://kazeuraki.net$1 permanent;
  13. }
  14. server {
  15. listen 80;
  16. server_name kazeuraki.net www.kazeuraki.net;
  17. rewrite ^(.*) https://kazeuraki.net$1 permanent;
  18. }
  19. server {
  20. listen 443 ssl http2;
  21.  
  22. # access_log off;
  23. access_log /home/kazeuraki.net/logs/access.log;
  24. # error_log off;
  25. error_log /home/kazeuraki.net/logs/error.log;
  26.  
  27. root /home/kazeuraki.net/public_html;
  28. index index.php index.html index.htm;
  29. server_name kazeuraki.net;
  30.  
  31. # SSL
  32. ssl_certificate /etc/letsencrypt/live/kazeuraki.net/fullchain.pem;
  33. ssl_certificate_key /etc/letsencrypt/live/kazeuraki.net/privkey.pem;
  34. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  35. ssl_prefer_server_ciphers on;
  36. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  37. # Improve HTTPS performance with session resumption
  38. ssl_session_cache shared:SSL:50m;
  39. ssl_session_timeout 1d;
  40. # OCSP Stapling
  41. ssl_stapling on;
  42. ssl_stapling_verify on;
  43. ssl_trusted_certificate /etc/letsencrypt/live/kazeuraki.net/chain.pem;
  44. resolver 8.8.8.8 8.8.4.4 valid=300s;
  45. resolver_timeout 30s;
  46. # DH parameters
  47. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  48. # Enable HSTS (https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security)
  49. add_header Strict-Transport-Security "max-age=31536000" always;
  50.  
  51. location / {
  52. try_files $uri $uri/ /index.php?$args;
  53. }
  54.  
  55. # Custom configuration
  56. include /home/kazeuraki.net/public_html/*.conf;
  57.  
  58. location ~ \.php$ {
  59. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  60. include /etc/nginx/fastcgi_params;
  61. fastcgi_pass 127.0.0.1:9000;
  62. fastcgi_index index.php;
  63. fastcgi_connect_timeout 300;
  64. fastcgi_send_timeout 300;
  65. fastcgi_read_timeout 300;
  66. fastcgi_buffer_size 32k;
  67. fastcgi_buffers 8 16k;
  68. fastcgi_busy_buffers_size 32k;
  69. fastcgi_temp_file_write_size 32k;
  70. fastcgi_intercept_errors on;
  71. fastcgi_param SCRIPT_FILENAME /home/kazeuraki.net/public_html$fastcgi_script_name;
  72. }
  73. location ~ /\. {
  74. deny all;
  75. }
  76. location = /favicon.ico {
  77. log_not_found off;
  78. access_log off;
  79. }
  80. location = /robots.txt {
  81. allow all;
  82. log_not_found off;
  83. access_log off;
  84. }
  85. location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|eot|svg|ttf|woff)$ {
  86. gzip_static off;
  87. add_header Pragma public;
  88. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  89. access_log off;
  90. expires 30d;
  91. break;
  92. }
  93.  
  94. location ~* \.(txt|js|css)$ {
  95. add_header Pragma public;
  96. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  97. access_log off;
  98. expires 30d;
  99. break;
  100. }
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement