Loomio
Wed 9 Dec 2020 7:28PM

How to use different port than 80 and 443 for loomio-nginx

G Giuseppe Public Seen by 113

Hi! Is there a way that I can set up to use another port than 80 and 443 for loomio-nginx?
The Ports 80 and 443 are already used by another application on my server (an installen nginx application, not the loomio-nginx from docker).

I tried to modify the docker-compose.yml like this:

...

nginx:
  container_name: loomio-nginx
  restart: always
  image: jwilder/nginx-proxy
  volumes:
    - /var/run/docker.sock:/tmp/docker.sock:ro
    - ./certificates:/etc/nginx/certs:ro
    - ./nginx/vhost.d:/etc/nginx/vhost.d
    - ./nginx/conf.d/custom.conf:/etc/nginx/conf.d/custom.conf:ro
    - ./nginx/html:/usr/share/nginx/html
  ports:
    - 81:80
    - 444:443
  links:
    - app

...


So I put 81:80 and 444:443. I thought that the port 81 will then redirected to tcp/80 in the docker. Same for 444 to 443. Or is this wrong?

What I observe is, that the containers are executed successfully (docker-compose up -d works) - but when I try to reach my loomio server by the domain url, it is not reached. It shows the nginx welcome page. I assume this is from the installen nginx application.

Could someone give me a hint what I have to do that the domain is forwarding to the right loomio-docker?
Is there something more that I need to set up?

I would appreciate any help.