From c960830f0f9a0458661c31e67ef909d0079eac8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Peters?= Date: Sun, 5 May 2019 23:08:00 +0200 Subject: [PATCH] Create u_e-webmail-site.md --- docs/u_e-webmail-site.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/u_e-webmail-site.md diff --git a/docs/u_e-webmail-site.md b/docs/u_e-webmail-site.md new file mode 100644 index 000000000..ecf77fff8 --- /dev/null +++ b/docs/u_e-webmail-site.md @@ -0,0 +1,35 @@ +To create a subdomain `webmail.example.org` and redirect it to SOGo, you need to create a new Nginx site. Take care of "CHANGE_TO_MAILCOW_HOSTNAME"! + +**nano data/conf/nginx/webmail.conf** +``` hl_lines="17" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + index index.php index.html; + client_max_body_size 0; + + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name webmail.example.org; + + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + + location / { + return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo; + } +} +``` + +Save and restart Nginx: `docker-compose restart nginx-mailcow`. + +Now open `mailcow.conf` and find `ADDITIONAL_SAN`. +Add `webmail.example.org` to this array, don't use quotes! + +``` +ADDITIONAL_SAN=webmail.example.org +``` + +Run `docker-compose up -d`. See "acme-mailcow" and "nginx-mailcow" logs if anything fails.