Possible SSL/Let'sEncrypt redirection bug



The EE generated force-ssl-example.com.conf files on a server with multiple subdomain sites redirected each site randomly to the incorrect ssl domain.

My solution was to replace the force-ssl files with a single redirect which assumes all sites are ssl enabled.

rm /etc/nginx/conf.d/force-ssl* cat << EOF > /etc/nginx/conf.d/orce-ssl.conf server { listen 80; return 301 https://$host$request_uri; } EOF service nginx restart

Has anyone else had problems with this redirection behaviour?


I don’t have subdomain sites but in my case, I always use www to all of my sites because of Why use WWW? Therefore I always edit force-ssl-example.com.conf and add www into it. May be $host is the best solution.