ubuntu@VM-16-13-ubuntu:~$ curl http://netmaker:808...
# install
h
ubuntu@VM-16-13-ubuntu:~$ curl http://netmaker:8081 curl: (6) Could not resolve host: netmaker
j
are you attempting to curl the container from the host? In the new docker-compose, those ports are not exposed to the host, you have to reach them via the caddy proxy + your domain, on port 443
h
# API https://xvpn.cc:81 { tls { dns lego_deprecated hurricane } reverse_proxy http://netmaker:8081 }
j
how did you install?
and what is the problem?
h
I installed it on the ECS,
ubuntu@VM-16-13-ubuntu:~$ sudo docker logs netmaker-ui >>>> backend set to: https://xvpn.cc:81 <<<<< 2022/05/20 09:49:15 [notice] 9#9: using the "epoll" event method 2022/05/20 09:49:15 [notice] 9#9: nginx/1.21.6 2022/05/20 09:49:15 [notice] 9#9: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027) 2022/05/20 09:49:15 [notice] 9#9: OS: Linux 5.4.0-96-generic 2022/05/20 09:49:15 [notice] 9#9: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2022/05/20 09:49:15 [notice] 9#9: start worker processes 2022/05/20 09:49:15 [notice] 9#9: start worker process 10 2022/05/20 09:49:15 [notice] 9#9: start worker process 11 >>>> backend set to: https://xvpn.cc:81 <<<<< 2022/05/20 10:53:44 [notice] 8#8: using the "epoll" event method 2022/05/20 10:53:44 [notice] 8#8: nginx/1.21.6 2022/05/20 10:53:44 [notice] 8#8: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027) 2022/05/20 10:53:44 [notice] 8#8: OS: Linux 5.4.0-96-generic 2022/05/20 10:53:44 [notice] 8#8: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2022/05/20 10:53:44 [notice] 8#8: start worker processes 2022/05/20 10:53:44 [notice] 8#8: start worker process 9 2022/05/20 10:53:44 [notice] 8#8: start worker process 10 ubuntu@VM-16-13-ubuntu:~$
ubuntu@VM-16-13-ubuntu:~$ curl http://127.0.0.1:8081 curl: (7) Failed to connect to 127.0.0.1 port 8081: Connection refused ubuntu@VM-16-13-ubuntu:~$
j
you are using nginx proxy, and not caddy?
h
I am on the server and cannot communicate with port: 8081
j
you are using nginx proxy, and not caddy?
h
It's caddy
j
in the new docker-compose we do not open 8081 on the server. It is proxied by caddy via the docker network
so it is never exposed on the host
if you want to do this, you can expose it by changing the docker compose
h
At 0.13.1, this is the case ports: - "51821-52830:51821-52830/udp" - "8081:8081"
j
are you using 0.13.1?
h
Now it's 0.14.0. There's no such line - "8081:8081"
j
yes, this is intentional
it is more secure
h
But it cannot be reverse proxied by caddy
j
h
Well, I noticed docker compose contained. YML and docker-compose. YML differences
Thank you very much. Cheers
# API https://xvpn.cc:81 { tls { dns lego_deprecated hurricane } reverse_proxy http://127.0.0.1:8081 } This is OK,
# API https://xvpn.cc:81 { tls { dns lego_deprecated hurricane } reverse_proxy http://netmaker:8081 } This does not work. The host name cannot be resolved
j
Unable to curl netmaker address locally through Caddy
h
This problem has been solved. I prefer to use the method in 0.13.1
7 Views