Advertisement
Guest User

conf.d

a guest
Apr 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name anonyviet.com www.anonyviet.com;
  4. return 301 https://$server_name$request_uri;
  5. }
  6.  
  7. server {
  8. listen 443 http2 ssl;
  9. server_name anonyviet.com www.anonyviet.com;
  10. keepalive_timeout 30;
  11.  
  12. ssl on;
  13. ssl_certificate /etc/ssl/anonyviet_com.crt;
  14. ssl_certificate_key /etc/ssl/private/anonyviet.com.key;
  15. ssl_session_timeout 5m;
  16. ssl_session_cache shared:SSL:10m;
  17. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  18. ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  19. ssl_prefer_server_ciphers on;
  20. add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
  21. ssl_stapling on;
  22.  
  23.  
  24.  
  25.  
  26. # access_log off;
  27. access_log /home/anonyviet.com/logs/access.log;
  28. # error_log off;
  29. error_log /home/anonyviet.com/logs/error.log;
  30.  
  31. root /home/anonyviet.com/public_html;
  32. index index.php index.html index.htm;
  33. server_name anonyviet.com;
  34.  
  35. location / {
  36. try_files $uri $uri/ /index.php?$args;
  37. }
  38.  
  39. # Custom configuration
  40. include /home/anonyviet.com/public_html/*.conf;
  41.  
  42. location ~ \.php$ {
  43. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  44. include /etc/nginx/fastcgi_params;
  45. fastcgi_pass 127.0.0.1:9000;
  46. fastcgi_index index.php;
  47. fastcgi_connect_timeout 300;
  48. fastcgi_send_timeout 300;
  49. fastcgi_read_timeout 300;
  50. fastcgi_buffer_size 32k;
  51. fastcgi_buffers 8 16k;
  52. fastcgi_busy_buffers_size 32k;
  53. fastcgi_temp_file_write_size 32k;
  54. fastcgi_intercept_errors on;
  55. fastcgi_param SCRIPT_FILENAME /home/anonyviet.com/public_html$fastcgi_script_name;
  56. }
  57. location ~ /\. {
  58. deny all;
  59. }
  60. location = /favicon.ico {
  61. log_not_found off;
  62. access_log off;
  63. }
  64. location = /robots.txt {
  65. allow all;
  66. log_not_found off;
  67. access_log off;
  68. }
  69. 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)$ {
  70. gzip_static off;
  71. add_header Pragma public;
  72. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  73. access_log off;
  74. expires 30d;
  75. break;
  76. }
  77.  
  78. location ~* \.(txt|js|css)$ {
  79. add_header Pragma public;
  80. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  81. access_log off;
  82. expires 30d;
  83. break;
  84. }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement