I have setup to a mailcow-dockerized solution to my server and I wanted to change my mailserver's the domain from mail.example.ml to mail.example.tk but When I did it my browser was complaining about the wrong certificate when I visited it the http://mail.example.tk on it.
Also the administration app was running behind nginx running as reverse proxy with the following renewed vhost configuration:
server {
listen 80;
server_name mail.thundermail.tk;
location /.well-known {
proxy_pass http://127.0.0.1:8080/.well-known ;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100m;
}
location / {
rewrite ^(.*) https://$server_name$1 permanent;
}
}
server {
listen 443 ssl;
server_name mail.thundermail.tk;
ssl_certificate /opt/docker-mailcow/data/assets/ssl/cert.pem;
ssl_certificate_key /opt/docker-mailcow/data/assets/ssl/key.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100m;
}
}
Please keep in ming that the mailcow:dockerized solution is generating the certificates in opt/docker-mailcow/data/assets/ssl
path.
Do you fellows have an idea how to generate the new Certificates?