Advertisement
aleuleu

happybep.com.conf.save

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