Guest User

Untitled

a guest
Nov 1st, 2020
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 443 ssl;
  3. server_name www.duhocuytin.com;
  4.  
  5. # SSL
  6. ssl_certificate /etc/letsencrypt/live/duhocuytin.com/fullchain.pem;
  7. ssl_certificate_key /etc/letsencrypt/live/duhocuytin.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://duhocuytin.com$1 permanent;
  13. }
  14. server {
  15. listen 80;
  16. server_name duhocuytin.com www.duhocuytin.com;
  17. rewrite ^(.*) https://duhocuytin.com$1 permanent;
  18. }
  19.  
  20. server {
  21. listen 443 ssl default_server;
  22.  
  23. # access_log off;
  24. access_log /home/duhocuytin.com/logs/access.log;
  25. # error_log off;
  26. error_log /home/duhocuytin.com/logs/error.log;
  27.  
  28. root /home/duhocuytin.com/public_html;
  29. index index.php index.html index.htm;
  30. server_name duhocuytin.com;
  31. # SSL
  32. ssl_certificate /etc/letsencrypt/live/duhocuytin.com/fullchain.pem;
  33. ssl_certificate_key /etc/letsencrypt/live/duhocuytin.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/duhocuytin.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 135.181.91.185;
  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 135.181.91.185;
  85. deny all;
  86. }
  87.  
  88. # Disable .htaccess and other hidden files
  89. location ~ /\.(?!well-known).* {
  90. deny all;
  91. access_log off;
  92. log_not_found off;
  93. }
  94.  
  95. location = /favicon.ico {
  96. log_not_found off;
  97. access_log off;
  98. }
  99.  
  100. location = /robots.txt {
  101. allow all;
  102. log_not_found off;
  103. access_log off;
  104. }
  105.  
  106. 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)$ {
  107. gzip_static off;
  108. add_header Pragma public;
  109. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  110. access_log off;
  111. expires 30d;
  112. break;
  113. }
  114.  
  115. location ~* \.(txt|js|css)$ {
  116. add_header Pragma public;
  117. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  118. access_log off;
  119. expires 30d;
  120. break;
  121. }
  122. }
  123.  
  124. server {
  125. listen 2020 ssl;
  126.  
  127. access_log off;
  128. log_not_found off;
  129. error_log /home/duhocuytin.com/logs/nginx_error.log;
  130.  
  131. root /home/duhocuytin.com/private_html;
  132. index index.php index.html index.htm;
  133. server_name duhocuytin.com;
  134. error_page 497 https://$server_name:$server_port$request_uri;
  135.  
  136. ssl_certificate /etc/letsencrypt/live/duhocuytin.com/fullchain.pem;
  137. ssl_certificate_key /etc/letsencrypt/live/duhocuytin.com/privkey.pem;
  138. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  139. ssl_prefer_server_ciphers on;
  140. ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  141.  
  142. auth_basic "Restricted";
  143. auth_basic_user_file /home/duhocuytin.com/private_html/hocvps/.htpasswd;
  144.  
  145. location / {
  146. autoindex on;
  147. try_files $uri $uri/ /index.php;
  148. }
  149.  
  150. location ~ \.php$ {
  151. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  152. include /etc/nginx/fastcgi_params;
  153. fastcgi_pass 127.0.0.1:9000;
  154. fastcgi_index index.php;
  155. fastcgi_connect_timeout 1000;
  156. fastcgi_send_timeout 1000;
  157. fastcgi_read_timeout 1000;
  158. fastcgi_buffer_size 256k;
  159. fastcgi_buffers 4 256k;
  160. fastcgi_busy_buffers_size 256k;
  161. fastcgi_temp_file_write_size 256k;
  162. fastcgi_intercept_errors on;
  163. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  164. }
  165.  
  166. location ~ /\. {
  167. deny all;
  168. }
  169. }
  170.  
RAW Paste Data