modoboa / modoboa-installer

An installer for Modoboa
MIT License
264 stars 138 forks source link

Let's Encrypt Issue HTTP/2 over HTTP #505

Closed pali7x closed 1 year ago

pali7x commented 1 year ago

Impacted versions

  1. Installation like usual, and then adding a second domain.

  2. Attempting to get certificate for second domain will end up in error as below :

  3. Domain: mail.second.com Type: connection Detail: IPV6-Address Fetching http://mail.second.com/.well-known/acme-challenge/ Server is speaking HTTP/2 over HTTP

    To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address. Additionally, please check that your computer has a publicly routable IP address and that no firewalls are preventing the server from communicating with the client. If you're using the webroot plugin, you should also verify that you are serving files from the webroot path you provided.

Editing conf in /etc/nginx/sites-enabled doesn't seems to work.

pali7x commented 1 year ago

I found the cause & fixed it, the autoconfig.conf was listening to port 80 with http2.

/etc/nginx/sites-enabled/autoconfig.domain.conf: listen 80 http2; /etc/nginx/sites-enabled/autoconfig.domain.conf: listen [::]:80 http2;

Simply removing it, and restart nginx to renew certificate works again without any issue.