mailcow-dockerized-docs/docs/u_e-80_to_443.md

598 B

Since February the 28th 2017 mailcow does come with port 80 and 443 enabled.

Open mailcow.conf and set HTTP_BIND=0.0.0.0 - if not already set.

Open data/conf/nginx/site.conf and add a new site at the top of that file:

server {
  listen 80 default_server;
  listen [::]:80 default_server;
  include /etc/nginx/conf.d/server_name.active;
  return 301 https://$host$uri$is_args$args;
}

In case you changed the HTTP_BIND parameter, recreate the container:

docker-compose up -d

Otherwise restart Nginx:

docker-compose restart nginx-mailcow