acme-companion: Wordpress doesn't work

Hello

Let’s encrypt companion

Thanks a lot for this docker image, great work ! I use it all the time for all my services that don’t have trusted https certificats.

Wordpress

Today I have been testing a Wordpress container with same parameters than other container, but unfortunatly I cannot connect to wordpress over https. If I try to force https like https://wordpress.XXX.XXX, I am redirected into another web service I have already installed, but nothing to do with wordpress.

Do you have any hypothese about this problem ?

Thanks again, very good work 😃

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 36 (1 by maintainers)

Most upvoted comments

Can you also post logs for nginx-proxy as well, same parts?

Just put a default.crt and default.key certificate in your certs directory, which you can generate like so

$ openssl req -newkey rsa:2048 -nodes -sha256 -keyout default.key -out default.csr

and self-sign like this

$ openssl x509 -req -days 365 -in default.csr -signkey default.key -out default.crt

this should add a “_” server block that will catch undefined server names for https as well.

See this part of nginx.tmpl :

{{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }}
server {
    server_name _; # This is just an invalid value which will never trigger on a real hostname.
    listen 443 ssl http2;
    access_log /var/log/nginx/access.log vhost;
    return 503;

    ssl_certificate /etc/nginx/certs/default.crt;
    ssl_certificate_key /etc/nginx/certs/default.key;
}
{{ end }}