Advertisement
Guest User

Untitled

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