Guest User

teehz

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