Change the listening port of an app

I wanted to know if it is possible to change the http or https listening port of an app eg. Roundcube , worspress ( https://mywebserver.domain:4443 ) etc.

Thank you

Hum short answer no but why do you want it ?

Hi @stephdl , I have to do some tests with haproxy and pfsense . However, if it can’t be done … nothing …

Generally speaking we want to do it to mask the service but in the case of roundcubemail it could be protected by crowdsec so no need to mask it

Ok, but what I want to do are just not security tests, but connection tests. Anyway, thank you as always.

And the long answer?

Hi Martin, what do you mean?

If i recall well the port of apache was static on ns7 but we could change it as we want in the virtualhost. In that case we run a container that probably use the tcp port 80 internally and for sur we cannot open it like this without conflict

So if a developer wants to use the tcp 4434 for example we need to
Open the port 4434 in the firewall
In the podman command publish the -p 4434:80 (not a good pratice to open widely the container)
Trade ourself with certificate, probably traefik could not handle it
Watch that any other containers use the port 4434

Well so roundcubemail has not been designed to do it

Another way could be in the set-route of traefik create a custom port to listen the https request like for 4434, it is quite simple and more integrated but it needs to patch treafik