Comment on Planning to selfhost images and calendar in addition to HTTP(S)
passenger@sopuli.xyz 1 day agoI had understood it has to be 443 and 80 for it to work, but this was wrong I guess. Maybe it was only a limitation of Nextcloud AIO which I would have used otherwise…?
diminou@lemmy.zip 1 day ago
In fact 80 and 443 refer to http and https, those are default ports.
You can in fact use the ports you want for the service you want. I have multiple web services behind the ports 80 and 443, you need one service that is able to get the request at the correct port. This is the role of the reverse proxy.
Apache can assume that role, you go to anything.yourdomain.com and apache will then redirect “anything” to the correct service (with the internal ip and port). So say you want to put nextcloud at 7777 you can tell docker to expose 7777 and redirect it to 443 on nextcloud.
The chain is like that in the case : nextcloud.yourdomain.com > apache > nextcloud is at ip:7777 > redirect the request to 7777 > nextcloud homepage is shown
passenger@sopuli.xyz 1 day ago
According to this it is not supported?
github.com/nextcloud/all-in-one?tab=readme-ov-fil…
However, I should learn how to do subdomains and the reverse proxy then… Which is another question.
I have until now a free domain which is somethig like mysubdomain.ddns.net. So I presume I need to get a paid domain for this so I can do subdomains
diminou@lemmy.zip 1 day ago
OK you are thinking at it the wrong way : 80 and 443 are the default ports for the web access of any web application.
You are using docker with the nextcloud aio image. Which mean, you are deploying a docker container which contain the web application.
What you are doing is using arbitrary ports for the container. This could be 7777. Then, this is redirected to 443 inside the container, to the web application.
This is why you can actually use any port you want for your container. You are not really switching the port for nextcloud, only for the container.
This is why I suggested doing 444:443 in the docker-compose.yml file: you are exposing 444 to the container, to 443 inside the container.
And this is why you can actually use any ports for every web app you are going to host : apache will redirect to the port you want to the container, a’d docker will redirect inside the container to either 80 or 443 (or anything else needed for that web application).
passenger@sopuli.xyz 1 day ago
Thank you for all the explanations! So I just need a second domain and apache will redirect 443 from that domain to 7777. The docker part I understood but having two apps on 443 on different domains but one machine is what was new to me.