Advertisement
Guest User

Untitled

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