portainer/portainer-compose

Changing from port 80 to another

turdusmerula opened this issue · 5 comments

Hello, this works very well !
I would like to switch from port 80 to another port for the reverse proxy, is there an easy way to do this?
Changing the docker-compose exposed port and nginx listening port does not seem enough.

Hi @turdusmerula, you'd also need to update the nginx configuration available at nginx/config/portainer.conf.

Thank you for your time,
here is what I did:

  • change listening port from 80 to 8100 in nginx/config/portainer.conf
  • changing exposed port in docker-compose.yml "8100:8100"
    This is enough to have nginx listening at 8100 but this does not work, do you have an idea of what is missing in the reverse proxy configuration?

That should be enough, note that you need to rebuild the nginx container to use the new configuration.

Made it work, I was following the wrong track as nginx should keep port 80, only portainer-proxy should be reconfigured to expose chosen port "8100:80".

Sweet, glad it's now working !