docker icon indicating copy to clipboard operation
docker copied to clipboard

How to configure for HTTP only?

Open pepoluan opened this issue 3 years ago • 1 comments

The reason is because, in my place of work, the SSL termination is already performed by the load balancer / gateway, so we really would like the Docker container to only respond to HTTP.

So, it is okay for Mattermost to insist that we access using https://mm.our.domain.com, but between the LB/GW and Mattermost, it really should be just plain HTTP.

I took a look at the included nginx.conf, and I'm not sure which lines I should 'merge' from the HTTPS server block into the HTTP server block...

pepoluan avatar Feb 17 '22 08:02 pepoluan

I have pretty much the same setup as yours, with pfsense renewing & terminating SSL at the gateway level, and its HAProxy as the reverse proxy. Inside the LAN, i only need mattermost with http.

In your mattermost docker folder, edit the .env file, commenting out:

#HTTPS_PORT=443
#HTTP_PORT=80

A little down below, set APP_PORT= to your http port, which then gets fed to your reverse proxy.

Then instead of using docker-compose.nginx.yml, use docker-compose.without-nginx.yml:

sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d

Note: The docker-compose.without-nginx.yml still has ${APP_PORT}:8065, which is probably the default and no need to change it.

R8s6 avatar Feb 17 '22 20:02 R8s6