Nginx redirect (non-www to www) not working with Certbot
问题 I have a website running with a Python/Django/uWSGI/Nginx setup. I also use Certbot to enable https on my site. My redirects from non-www to www (e.g. "example.com" to "www.example.com") result in a "Bad Request (400)" message even though I couldn't spot any deviations from the Nginx/Certbot documentation. Here is the relevant part of my sites-available Nginx code: server { listen 80; server_name example.com www.example.com; location = /favicon.ico { access_log off; log_not_found off; }