default.conf 790 B

12345678910111213141516171819202122232425262728293031323334353637
  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;
  11. {% else -%}
  12. #listen [::]:80;
  13. {% endif %}
  14. server_name default-host.localhost;
  15. access_log /data/logs/default_host.log combined;
  16. {% include "_exploits.conf" %}
  17. {%- if value == "404" %}
  18. location / {
  19. return 404;
  20. }
  21. {% endif %}
  22. {%- if value == "redirect" %}
  23. location / {
  24. return 301 {{ meta.redirect }};
  25. }
  26. {%- endif %}
  27. {%- if value == "html" %}
  28. root /data/nginx/default_www;
  29. location / {
  30. try_files $uri /index.html;
  31. }
  32. {%- endif %}
  33. }
  34. {% endif %}