Hmm, I think I found the issue, I have to add a listen for every port? No other change seems necessary. ``` server { listen 80; listen 443; listen [::]:80; listen [::]:443; server_name forum.example.com; return 302 https://example.com$request_uri; } server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name _; ... } ```by AquaL1te - How to...
I have the following custom default vhost which catches the HTTP traffic and redirects clients to the right web root for e.g. the ACME challenge. Everything else is redirected to HTTPS. I use here the `server_name _;`. Which is a catch-all and also this vhost is set as the `default_server` for HTTP (port 80) traffic. ``` server { listen 80 default_server; listen [::]:80 default_server;by AquaL1te - How to...