default.conf 714 B

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