default.conf 814 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.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. # root /var/www/test2;
  30. location / {
  31. try_files $uri /index.html;
  32. }
  33. {%- endif %}
  34. }
  35. {% endif %}