Advertisement
Guest User

vdoll

a guest
Sep 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. server {
  2. listen 443 ssl;
  3. server_name www.vdoll.store;
  4.  
  5. # SSL
  6. ssl_certificate /etc/letsencrypt/live/vdoll.store/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/vdoll.store/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://vdoll.store$1 permanent;
  13. }
  14. server {
  15. listen 80;
  16. server_name vdoll.store www.vdoll.store;
  17. rewrite ^(.*) https://vdoll.store$1 permanent;
  18. }
  19.  
  20. server {
  21. listen 443 ssl default_server;
  22.  
  23. # access_log off;
  24. access_log /home/vdoll.store/logs/access.log;
  25. # error_log off;
  26. error_log /home/vdoll.store/logs/error.log;
  27.  
  28. root /home/vdoll.store/public_html;
  29. index index.php index.html index.htm;
  30. server_name vdoll.store;
  31.  
  32. # SSL
  33. ssl_certificate /etc/letsencrypt/live/vdoll.store/fullchain.pem;
  34. ssl_certificate_key /etc/letsencrypt/live/vdoll.store/privkey.pem;
  35. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  36. ssl_prefer_server_ciphers on;
  37. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  38.  
  39. # Improve HTTPS performance with session resumption
  40. ssl_session_cache shared:SSL:50m;
  41. ssl_session_timeout 1d;
  42.  
  43. # DH parameters
  44. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  45. # Enable HSTS
  46. add_header Strict-Transport-Security "max-age=31536000" always;
  47.  
  48. location / {
  49. try_files $uri $uri/ /index.php?$args;
  50. }
  51.  
  52. # Custom configuration
  53. include /home/vdoll.store/public_html/*.conf;
  54.  
  55. location ~ \.php$ {
  56. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  57. include /etc/nginx/fastcgi_params;
  58. fastcgi_pass 127.0.0.1:9000;
  59. fastcgi_index index.php;
  60. fastcgi_connect_timeout 1000;
  61. fastcgi_send_timeout 1000;
  62. fastcgi_read_timeout 1000;
  63. fastcgi_buffer_size 256k;
  64. fastcgi_buffers 4 256k;
  65. fastcgi_busy_buffers_size 256k;
  66. fastcgi_temp_file_write_size 256k;
  67. fastcgi_intercept_errors on;
  68. fastcgi_param SCRIPT_FILENAME /home/vdoll.store/public_html$fastcgi_script_name;
  69. }
  70. location /nginx_status {
  71. stub_status on;
  72. access_log off;
  73. allow 127.0.0.1;
  74. deny all;
  75. }
  76. location /php_status {
  77. fastcgi_pass 127.0.0.1:9000;
  78. fastcgi_index index.php;
  79. fastcgi_param SCRIPT_FILENAME /home/vdoll.store/public_html$fastcgi_script_name;
  80. include /etc/nginx/fastcgi_params;
  81. allow 127.0.0.1;
  82. deny all;
  83. }
  84. # Disable .htaccess and other hidden files
  85. location ~ /\.(?!well-known).* {
  86. deny all;
  87. access_log off;
  88. log_not_found off;
  89. }
  90. location = /favicon.ico {
  91. log_not_found off;
  92. access_log off;
  93. }
  94. location = /robots.txt {
  95. allow all;
  96. log_not_found off;
  97. access_log off;
  98. }
  99. 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)$ {
  100. gzip_static off;
  101. add_header Pragma public;
  102. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  103. access_log off;
  104. expires 30d;
  105. break;
  106. }
  107.  
  108. location ~* \.(txt|js|css)$ {
  109. add_header Pragma public;
  110. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  111. access_log off;
  112. expires 30d;
  113. break;
  114. }
  115. }
  116.  
  117. server {
  118. listen 6868 ssl;
  119.  
  120. access_log off;
  121. log_not_found off;
  122. error_log /home/vdoll.store/logs/nginx_error.log;
  123.  
  124. root /home/vdoll.store/private_html;
  125. index index.php index.html index.htm;
  126. server_name vdoll.store;
  127.  
  128. error_page 497 https://$server_name:$server_port$request_uri;
  129.  
  130. ssl_certificate /etc/letsencrypt/live/vdoll.store/fullchain.pem;
  131. ssl_certificate_key /etc/letsencrypt/live/vdoll.store/privkey.pem;
  132. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  133. ssl_prefer_server_ciphers on;
  134. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  135.  
  136. auth_basic "Restricted";
  137. auth_basic_user_file /home/vdoll.store/private_html/hocvps/.htpasswd;
  138.  
  139. location / {
  140. autoindex on;
  141. try_files $uri $uri/ /index.php;
  142. }
  143.  
  144. location ~ \.php$ {
  145. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  146. include /etc/nginx/fastcgi_params;
  147. fastcgi_pass 127.0.0.1:9000;
  148. fastcgi_index index.php;
  149. fastcgi_connect_timeout 1000;
  150. fastcgi_send_timeout 1000;
  151. fastcgi_read_timeout 1000;
  152. fastcgi_buffer_size 256k;
  153. fastcgi_buffers 4 256k;
  154. fastcgi_busy_buffers_size 256k;
  155. fastcgi_temp_file_write_size 256k;
  156. fastcgi_intercept_errors on;
  157. fastcgi_param SCRIPT_FILENAME /home/vdoll.store/private_html$fastcgi_script_name;
  158. }
  159.  
  160. location ~ /\. {
  161. deny all;
  162. }
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement