Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. server {
  2. listen 443 ssl http2;
  3. server_name www.vinapixel.com;
  4.  
  5. # SSL
  6. ssl_certificate /etc/letsencrypt/live/vinapixel.com/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/vinapixel.com/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. rewrite ^(.*) https://vinapixel.com$1 permanent;
  12. }
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. server {
  20. listen 80;
  21.  
  22. server_name vinapixel.com www.vinapixel.com;
  23. rewrite ^(.*) https://vinapixel.com$1 permanent;
  24. }
  25. server {
  26. listen listen 443 ssl http2;
  27.  
  28. # access_log off;
  29. access_log /home/vinapixel.com/logs/access.log;
  30. # error_log off;
  31. error_log /home/vinapixel.com/logs/error.log;
  32.  
  33. root /home/vinapixel.com/public_html;
  34. index index.php index.html index.htm;
  35. server_name vinapixel.com;
  36.  
  37.  
  38. # SSL
  39. ssl_certificate /etc/letsencrypt/live/vinapixel.com/fullchain.pem;
  40. ssl_certificate_key /etc/letsencrypt/live/vinapixel.com/privkey.pem;
  41. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  42. ssl_prefer_server_ciphers on;
  43. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  44.  
  45. # Improve HTTPS performance with session resumption
  46. ssl_session_cache shared:SSL:50m;
  47. ssl_session_timeout 1d;
  48.  
  49. # DH parameters
  50. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  51. # Enable HSTS
  52. add_header Strict-Transport-Security "max-age=31536000" always;
  53.  
  54.  
  55. # Custom configuration
  56. include /home/vinapixel.com/public_html/*.conf;
  57.  
  58. location / {
  59. try_files $uri $uri/ /index.php?$args;
  60. }
  61.  
  62. location ~ \.php$ {
  63. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  64. include /etc/nginx/fastcgi_params;
  65. fastcgi_pass 127.0.0.1:9000;
  66. fastcgi_index index.php;
  67. fastcgi_connect_timeout 300;
  68. fastcgi_send_timeout 300;
  69. fastcgi_read_timeout 300;
  70. fastcgi_buffer_size 32k;
  71. fastcgi_buffers 8 16k;
  72. fastcgi_busy_buffers_size 32k;
  73. fastcgi_temp_file_write_size 32k;
  74. fastcgi_intercept_errors on;
  75. fastcgi_param SCRIPT_FILENAME /home/vinapixel.com/public_html$fastcgi_script_name;
  76. }
  77. location ~ /\. {
  78. deny all;
  79. }
  80. location = /favicon.ico {
  81. log_not_found off;
  82. access_log off;
  83. }
  84. location = /robots.txt {
  85. allow all;
  86. log_not_found off;
  87. access_log off;
  88. }
  89. 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)$ {
  90. gzip_static off;
  91. add_header Pragma public;
  92. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  93. access_log off;
  94. expires 30d;
  95. break;
  96. }
  97.  
  98. location ~* \.(txt|js|css)$ {
  99. add_header Pragma public;
  100. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  101. access_log off;
  102. expires 30d;
  103. break;
  104. }
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement