default.conf 997 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # ------------------------------------------------------------
  2. # Default Site
  3. # ------------------------------------------------------------
  4. {% if value == "congratulations" %}
  5. # Skipping output, congratulations page configration is baked in.
  6. {%- else %}
  7. server {
  8. listen 80 default;
  9. {% if ipv6 -%}
  10. listen [::]:80 default;
  11. {% else -%}
  12. #listen [::]:80 default;
  13. {% endif %}
  14. server_name default-host.localhost;
  15. access_log /data/logs/default-host_access.log combined;
  16. error_log /data/logs/default-host_error.log warn;
  17. {% include "_exploits.conf" %}
  18. include conf.d/include/letsencrypt-acme-challenge.conf;
  19. {%- if value == "404" %}
  20. location / {
  21. return 404;
  22. }
  23. {% endif %}
  24. {%- if value == "444" %}
  25. location / {
  26. return 444;
  27. }
  28. {% endif %}
  29. {%- if value == "redirect" %}
  30. location / {
  31. return 301 {{ meta.redirect }};
  32. }
  33. {%- endif %}
  34. {%- if value == "html" %}
  35. root /data/nginx/default_www;
  36. location / {
  37. try_files $uri /index.html;
  38. }
  39. {%- endif %}
  40. }
  41. {% endif %}