Closed brccabral closed 5 months ago
Ok, I got it.
On my local nginx I set it to listen 443 only on my WiFi IP
server {
...
listen 192.168.0.12:443
...
}
Just listen 443
makes it listen to all local IPs, *:443
.
To check it, run
sudo lsof -i -P -n | grep LISTEN | grep :443
Then, for the proxy
, set it to listen to the gateway from the network master_default
that nextcloud-docker-dev
has created.
To find it:
docker inspect master_default | grep Gateway
This can be changed with DOCKER_SUBNET
.
My .env
now looks like this
...
DOCKER_SUBNET=192.168.21.0/24
...
PROXY_PORT_HTTPS=192.168.21.1:443
Now, recreate proxy
with docker compose
docker compose up -d proxy
If I list the listening ports again with sudo lsof -i -P -n | grep LISTEN | grep :443
I can see both IPs listening to port 443
docker-pr 1333014 root 4u IPv4 5985024 0t0 TCP 192.168.21.1:443 (LISTEN)
nginx 1335944 root 13u IPv4 5999398 0t0 TCP 192.168.0.12:443 (LISTEN)
nginx 1335945 www-data 13u IPv4 5999398 0t0 TCP 192.168.0.12:443 (LISTEN)
And finally I configure my DNS server (PiHole) to respond nextcloud.local
to 192.168.21.4
(the proxy, not the gateway).
Hi, I have another service running on port 443 and 80 and wanted to run
nextcloud-docker-dev
on a different port. I setPROXY_PORT_HTTP=8070
andPROXY_PORT_HTTPS=7443
on my.env
file, the docker compose created themaster-proxy
with these new ports, but when I accesshttps://nextcloud.local:7443
it seems that the proxy sends me back tohttps://nextcloud.local
which opens my other service, not Nextcloud. If I stop the other service, and use default proxy ports 443/80 thenhttps://nextcloud.local
is accessible, but I need the other service on 443.Am I missing something or is it not possible to run
nextcloud-docker-dev
on a different port? Thanks