Advertisement
Guest User

Untitled

a guest
Feb 6th, 2020
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.42 KB | None | 0 0
  1. # For more information on configuration, see:
  2. # * Official English Documentation: http://nginx.org/en/docs/
  3. # * Official Russian Documentation: http://nginx.org/ru/docs/
  4.  
  5. user www-data;
  6. worker_processes auto;
  7. error_log /var/log/nginx/error.log;
  8. pid /run/nginx.pid;
  9.  
  10. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  11. include /usr/share/nginx/modules/*.conf;
  12.  
  13. events {
  14. worker_connections 1024;
  15. }
  16.  
  17. http {
  18. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  19. '$status $body_bytes_sent "$http_referer" '
  20. '"$http_user_agent" "$http_x_forwarded_for"';
  21.  
  22. access_log /var/log/nginx/access.log main;
  23.  
  24. sendfile on;
  25. tcp_nopush on;
  26. tcp_nodelay on;
  27. keepalive_timeout 65;
  28. types_hash_max_size 2048;
  29.  
  30. include /etc/nginx/mime.types;
  31. default_type application/octet-stream;
  32.  
  33. # Load modular configuration files from the /etc/nginx/conf.d directory.
  34. # See http://nginx.org/en/docs/ngx_core_module.html#include
  35. # for more information.
  36. include /etc/nginx/conf.d/*.conf;
  37. ###Vastspace.ca
  38. server {
  39. listen 80 default_server;
  40. listen [::]:80 default_server;
  41. server_name vastspace.ca;
  42. root /var/www/html/vastspace.ca;
  43.  
  44. # Load configuration files for the default server block.
  45. include /etc/nginx/default.d/*.conf;
  46.  
  47. location / {
  48. }
  49.  
  50. error_page 404 /404.html;
  51. location = /40x.html {
  52. }
  53.  
  54. error_page 500 502 503 504 /50x.html;
  55. location = /50x.html {
  56. }
  57. }
  58. ###Files.vastspace.ca
  59. # server {
  60. # listen 80 default_server;
  61. # listen [::]:80 default_server;
  62. # server_name files.vastspace.ca;
  63. # root /var/www/html/files.vastspace.ca;
  64. #
  65. # # Load configuration files for the default server block.
  66. # include /etc/nginx/default.d/*.conf;
  67. #
  68. # location / {
  69. # }
  70. #
  71. # error_page 404 /404.html;
  72. # location = /40x.html {
  73. # }
  74. #
  75. # error_page 500 502 503 504 /50x.html;
  76. # location = /50x.html {
  77. # }
  78. # }
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. # Settings for a TLS enabled server.
  86. #
  87. # server {
  88. # listen 443 ssl http2 default_server;
  89. # listen [::]:443 ssl http2 default_server;
  90. # server_name _;
  91. # root /var/www/html/vastspace.ca;
  92. #
  93. # ssl_certificate "/etc/pki/nginx/server.crt";
  94. # ssl_certificate_key "/etc/pki/nginx/private/server.key";
  95. # ssl_session_cache shared:SSL:1m;
  96. # ssl_session_timeout 10m;
  97. # ssl_ciphers HIGH:!aNULL:!MD5;
  98. # ssl_prefer_server_ciphers on;
  99. #
  100. # # Load configuration files for the default server block.
  101. # include /etc/nginx/default.d/*.conf;
  102. #
  103. # location / {
  104. # }
  105. #
  106. # error_page 404 /404.html;
  107. # location = /40x.html {
  108. # }
  109. #
  110. # error_page 500 502 503 504 /50x.html;
  111. # location = /50x.html {
  112. # }
  113. # }
  114.  
  115.  
  116. ###Vastspace.ca
  117. server {
  118. server_name www.vastspace.ca vastspace.ca; # managed by Certbot
  119. root /var/www/html/vastspace.ca;
  120.  
  121. # Load configuration files for the default server block.
  122. #include /etc/nginx/default.d/*.conf;
  123.  
  124. location / {
  125. }
  126.  
  127. error_page 404 /404.html;
  128. location = /40x.html {
  129. }
  130.  
  131. error_page 500 502 503 504 /50x.html;
  132. location = /50x.html {
  133. }
  134. ###Files.Vastspace.ca
  135.  
  136. # #server {
  137. # server_name files.vastspace.ca; # managed by Certbot
  138. # root /var/www/html/files.vastspace.ca;
  139. #
  140. # # Load configuration files for the default server block.
  141. # # include /etc/nginx/default.d/*.conf;
  142. #
  143. # location / {
  144. # }
  145. #
  146. # error_page 404 /404.html;
  147. # location = /40x.html {
  148. # }
  149. #
  150. # error_page 500 502 503 504 /50x.html;
  151. # location = /50x.html {
  152. # }
  153.  
  154.  
  155. listen [::]:443 ssl ipv6only=on; # managed by Certbot
  156. listen 443 ssl; # managed by Certbot
  157. ssl_certificate /etc/letsencrypt/live/vastspace.ca/fullchain.pem; # managed by Certbot
  158. ssl_certificate_key /etc/letsencrypt/live/vastspace.ca/privkey.pem; # managed by Certbot
  159. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  160. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  161.  
  162. }
  163.  
  164. server {
  165. if ($host = pixel.vastspace.ca) {
  166. return 301 https://$host$request_uri;
  167. } # managed by Certbot
  168.  
  169.  
  170. if ($host = blog.vastspace.ca) {
  171. return 301 https://$host$request_uri;
  172. } # managed by Certbot
  173.  
  174.  
  175. if ($host = social.vastspace.ca) {
  176. return 301 https://$host$request_uri;
  177. } # managed by Certbot
  178.  
  179.  
  180. if ($host = files.vastspace.ca) {
  181. return 301 https://$host$request_uri;
  182. } # managed by Certbot
  183.  
  184.  
  185. if ($host = www.vastspace.ca) {
  186. return 301 https://$host$request_uri;
  187. } # managed by Certbot
  188.  
  189.  
  190. if ($host = vastspace.ca) {
  191. return 301 https://$host$request_uri;
  192. } # managed by Certbot
  193.  
  194.  
  195. listen 80 ;
  196. listen [::]:80 ;
  197. server_name blog.vastspace.ca www.vastspace.ca social.vastspace.ca pixel.vastspace.ca files.vastspace.ca vastspace.ca;
  198. return 404; # managed by Certbot
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement