0

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?

1 Answer 1

0

Follow this steps:

1 cd ^path_where_mailcow_dockerized_is_installed^ 2 On mailcow.conf change the line starting with MAILCOW_HOSTNAME into

MAILCOW_HOSTNAME=mail.example.tk

3 Run: docker-compose down && docker-compose up -d

4 Restart nginx. (In debian or debian based linux distros this can be done via sudo service nginx restart command)

1
  • If this indeed does answer your question, please mark it as answered. Otherwise the question forever cycles to the top of Active questions.
    – Paul
    Jul 20, 2021 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .