Advertisement
kazeuraki

bidmua.com

Feb 27th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. server {
  2. listen 443 ssl http2;
  3. server_name www.bidmua.com;
  4.  
  5. # SSL
  6. ssl_certificate /etc/letsencrypt/live/bidmua.com/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/bidmua.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.  
  12. rewrite ^(.*) https://bidmua.com$1 permanent;
  13. }
  14. server {
  15. listen 80;
  16. server_name bidmua.com www.bidmua.com;
  17. rewrite ^(.*) https://bidmua.com$1 permanent;
  18. }
  19. server {
  20. listen 443 ssl http2;
  21.  
  22. access_log off;
  23. # access_log /home/bidmua.com/logs/access.log;
  24. error_log off;
  25. # error_log /home/bidmua.com/logs/error.log;
  26.  
  27. root /home/bidmua.com/public_html;
  28. index index.php index.html index.htm;
  29. server_name bidmua.com;
  30.  
  31. # SSL
  32. ssl_certificate /etc/letsencrypt/live/bidmua.com/fullchain.pem;
  33. ssl_certificate_key /etc/letsencrypt/live/bidmua.com/privkey.pem;
  34. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  35. ssl_prefer_server_ciphers on;
  36. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  37.  
  38. # Improve HTTPS performance with session resumption
  39. ssl_session_cache shared:SSL:50m;
  40. ssl_session_timeout 1d;
  41.  
  42. # DH parameters
  43. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  44.  
  45. # Enable HSTS (https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security)
  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/bidmua.com/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/bidmua.com/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/bidmua.com/public_html$fastcgi_script_name;
  80. include /etc/nginx/fastcgi_params;
  81. allow 127.0.0.1;
  82. deny all;
  83. }
  84. location ~ /\. {
  85. deny all;
  86. }
  87. location = /favicon.ico {
  88. log_not_found off;
  89. access_log off;
  90. }
  91. location = /robots.txt {
  92. allow all;
  93. log_not_found off;
  94. access_log off;
  95. }
  96. 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)$ {
  97. gzip_static off;
  98. add_header Pragma public;
  99. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  100. access_log off;
  101. expires 30d;
  102. break;
  103. }
  104.  
  105. location ~* \.(txt|js|css)$ {
  106. add_header Pragma public;
  107. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  108. access_log off;
  109. expires 30d;
  110. break;
  111. }
  112. }
  113. server {
  114. listen 2017 ssl http2;
  115. access_log off;
  116. log_not_found off;
  117. error_log off;
  118. root /home/bidmua.com/private_html;
  119. index index.php index.html index.htm;
  120. server_name bidmua.com;
  121. error_page 497 https://$host:2017$request_uri;
  122. # SSL
  123. ssl_certificate /etc/letsencrypt/live/bidmua.com/fullchain.pem;
  124. ssl_certificate_key /etc/letsencrypt/live/bidmua.com/privkey.pem;
  125. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  126. ssl_prefer_server_ciphers on;
  127. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  128.  
  129. auth_basic "Restricted";
  130. auth_basic_user_file /home/bidmua.com/private_html/hocvps/.htpasswd;
  131.  
  132. location / {
  133. try_files $uri $uri/ /index.php;
  134. }
  135.  
  136. location ~ \.php$ {
  137. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  138. include /etc/nginx/fastcgi_params;
  139. fastcgi_pass 127.0.0.1:9000;
  140. fastcgi_index index.php;
  141. fastcgi_connect_timeout 1000;
  142. fastcgi_send_timeout 1000;
  143. fastcgi_read_timeout 1000;
  144. fastcgi_buffer_size 256k;
  145. fastcgi_buffers 4 256k;
  146. fastcgi_busy_buffers_size 256k;
  147. fastcgi_temp_file_write_size 256k;
  148. fastcgi_intercept_errors on;
  149. fastcgi_param SCRIPT_FILENAME /home/bidmua.com/private_html$fastcgi_script_name;
  150. }
  151.  
  152. location ~ /\. {
  153. deny all;
  154. }
  155. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement