![](https://lemmy.wtf/api/v3/image_proxy?url=https%3A%2F%2Fprogramming.dev%2Fpictrs%2Fimage%2F22dd9a99-bb60-48d1-9a70-847d7eee1ebc.png)
![](https://lemmy.wtf/api/v3/image_proxy?url=https%3A%2F%2Fprogramming.dev%2Fpictrs%2Fimage%2Ff3a4dd5f-1257-47c8-825a-03a4ebceace3.webp)
The full working code:
server {
listen 443 ssl;
server_name _;
ssl_certificate /etc/nginx/ssl/catchall.crt;
ssl_certificate_key /etc/nginx/ssl/catchall.key;
error_page 404 /404_CatchAll.html;
# Everything is a 404
location / {
return 404;
}
location /404_CatchAll.html {root /var/www/html/;}
}
I wanted to have a
default server
that catch ~wrong DNS query to the serverSolution
I don’t know how to link to my previous lemmy post, so here it is again