Guest User

Untitled

a guest
Apr 29th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 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. # access_log off;
  25. access_log /home/anonyviet.com/logs/access.log;
  26. # error_log off;
  27. error_log /home/anonyviet.com/logs/error.log;
  28.  
  29. root /home/anonyviet.com/public_html;
  30. index index.php index.html index.htm;
  31. server_name anonyviet.com;
  32.  
  33. location / {
  34. try_files $uri $uri/ /index.php?$args;
  35. }
  36.  
  37. # Custom configuration
  38. include /home/anonyviet.com/public_html/*.conf;
  39.  
  40. location ~ \.php$ {
  41. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  42. include /etc/nginx/fastcgi_params;
  43. fastcgi_pass 127.0.0.1:9000;
  44. fastcgi_index index.php;
  45. fastcgi_connect_timeout 1000;
  46. fastcgi_send_timeout 1000;
  47. fastcgi_read_timeout 1000;
  48. fastcgi_buffer_size 256k;
  49. fastcgi_buffers 4 256k;
  50. fastcgi_busy_buffers_size 256k;
  51. fastcgi_temp_file_write_size 256k;
  52. fastcgi_intercept_errors on;
  53. fastcgi_param SCRIPT_FILENAME /home/anonyviet.com/public_html$fastcgi_script_name;
  54. }
  55. location /nginx_status {
  56. stub_status on;
  57. access_log off;
  58. allow 127.0.0.1;
  59. deny all;
  60. }
  61. location /php_status {
  62. fastcgi_pass 127.0.0.1:9000;
  63. fastcgi_index index.php;
  64. fastcgi_param SCRIPT_FILENAME /home/anonyviet.com/public_html$fastcgi_script_name;
  65. include /etc/nginx/fastcgi_params;
  66. allow 127.0.0.1;
  67. deny all;
  68. }
  69. location ~ /\. {
  70. deny all;
  71. }
  72. location = /favicon.ico {
  73. log_not_found off;
  74. access_log off;
  75. }
  76. location = /robots.txt {
  77. allow all;
  78. log_not_found off;
  79. access_log off;
  80. }
  81. 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)$ {
  82. gzip_static off;
  83. add_header Pragma public;
  84. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  85. access_log off;
  86. expires 30d;
  87. break;
  88. }
  89.  
  90. location ~* \.(txt|js|css)$ {
  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.  
  99. server {
  100. listen 7777;
  101.  
  102. access_log off;
  103. log_not_found off;
  104. error_log /home/anonyviet.com/logs/nginx_error.log;
  105.  
  106. root /home/anonyviet.com/private_html;
  107. index index.php index.html index.htm;
  108. server_name anonyviet.com;
  109.  
  110. auth_basic "Restricted";
  111. auth_basic_user_file /home/anonyviet.com/private_html/hocvps/.htpasswd;
  112.  
  113. location / {
  114. try_files $uri $uri/ /index.php;
  115. }
  116.  
  117. location ~ \.php$ {
  118. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  119. include /etc/nginx/fastcgi_params;
  120. fastcgi_pass 127.0.0.1:9000;
  121. fastcgi_index index.php;
  122. fastcgi_connect_timeout 1000;
  123. fastcgi_send_timeout 1000;
  124. fastcgi_read_timeout 1000;
  125. fastcgi_buffer_size 256k;
  126. fastcgi_buffers 4 256k;
  127. fastcgi_busy_buffers_size 256k;
  128. fastcgi_temp_file_write_size 256k;
  129. fastcgi_intercept_errors on;
  130. fastcgi_param SCRIPT_FILENAME /home/anonyviet.com/private_html$fastcgi_script_name;
  131. }
  132.  
  133. location ~ /\. {
  134. deny all;
  135. }
  136. }
Advertisement
Add Comment
Please, Sign In to add comment