default.conf 849 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_access.log combined;
  16. error_log /data/logs/default-host_error.log warn;
  17. {% include "_exploits.conf" %}
  18. {%- if value == "404" %}
  19. location / {
  20. return 404;
  21. }
  22. {% endif %}
  23. {%- if value == "redirect" %}
  24. location / {
  25. return 301 {{ meta.redirect }};
  26. }
  27. {%- endif %}
  28. {%- if value == "html" %}
  29. root /data/nginx/default_www;
  30. location / {
  31. try_files $uri /index.html;
  32. }
  33. {%- endif %}
  34. }
  35. {% endif %}