smartbotics-catchall.conf 1.2 KB

123456789101112131415161718192021222324252627282930
  1. # Catch-all: requests naming no hostname we serve - the bare IP, an unknown
  2. # name, a stale DNS record, a scanner dialling the address directly.
  3. #
  4. # This file exists so that Debian's /etc/nginx/sites-available/default never
  5. # has to be edited. That file is a dpkg CONFFILE owned by nginx-common, and a
  6. # modified conffile makes every future nginx upgrade stop and ask about a
  7. # three-way merge - a small tidy-up turning into an interactive prompt during
  8. # an unattended upgrade. It is left byte-for-byte as the package shipped it and
  9. # simply not symlinked into sites-enabled. Nothing here is package-owned, so
  10. # upgrades never touch it. The same rule applies to /var/www/html, which still
  11. # holds the stock Debian page: it is not edited, it is just never served.
  12. server {
  13. listen 80 default_server;
  14. listen [::]:80 default_server;
  15. server_name _;
  16. include /etc/nginx/snippets/branded-errors.conf;
  17. # The root gets the landing text rather than the generic "not found", but
  18. # still answers 404: nothing is published here, and a 200 would say
  19. # otherwise to every monitor and crawler that asks.
  20. location = / {
  21. error_page 404 /_brand/landing.html;
  22. return 404;
  23. }
  24. location / {
  25. return 404;
  26. }
  27. }