I wanted to have a default server
that catch ~wrong DNS query to the server
I don’t know how to link to my previous lemmy post, so here it is again
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/;}
}
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/;}
}
ok I’ve found something that ~works !
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.html; #at /var/www/html/
location /404.html {internal;}
return 404;
}
so i get the default 404 html from nginx. but not the one that I specified error_page 404 /404.html;
any ideas ?
line 5 you mean ?
error_page 404 /404.html; #this one ?
Has I found nothing, I’ve write a piece of code in Python 🐍 ! and compile it for Windows…
Thank you @Vilian@lemmy.ca Seem great, I’ll keep it for later :)
But not for what I need now, as
Mutt is a small but very powerful text-based mail client for Unix operating systems
and it’s a “full” client, I need just the SMTP functionality.
yes, it’s been years that I’m using CMD
and as I’m planning get rid of windows there is no point for me to learn it.
see my comment in the original post ( https://programming.dev/post/6111023) for more info on the suspected bug.
I don’t see python on your image :)