- 10 Posts
- 6 Comments
Joined 2 years ago
Cake day: October 8th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
Rick_C137@programming.devto Programming@programming.dev•The US government wants devs to stop using C and C++English1·8 months agoI don’t see python on your image :)
Rick_C137@programming.devOPto Web Development@programming.dev•nginx, Default server do not works ! [solved]English1·1 year agoI 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
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/;} }
Rick_C137@programming.devOPto Web Development@programming.dev•nginx, Default server do not works ! [solved]English1·1 year agoThe 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/;} }
Rick_C137@programming.devOPto Web Development@programming.dev•nginx, Default server do not works ! [solved]English1·1 year agook 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 ?
Rick_C137@programming.devOPto Web Development@programming.dev•nginx, Default server do not works ! [solved]1·1 year agoline 5 you mean ?
error_page 404 /404.html; #this one ?
solved: https://programming.dev/post/34280775/18258169