Advertisement
Guest User

Untitled

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