DocFraggle Did you check if all the containers are running? Did you check the container logs? Did you check your host’s firewall if present? Did you check if any other services are running on the ports mailcow needs?
DocFraggle DocFraggle Did you check the container logs? Did you check your host’s firewall if present? Did you check if any other services are running on the ports mailcow needs? ☝️
nickydream_ DocFraggle Apart from container logs, I checked firewall, not problem here . And nginx is proxying a web and mailcow, but there are in different ports. I had checked they don’t have a Port conflict. Where do I check the container logs? I have checked nginx error log. Also normal.
DocFraggle If you connect to localhost:8080 in your nginx reverseproxy config you have to run mailcow on 8080 HTTP_PORT=8080 Red the docs: https://docs.mailcow.email/post_installation/reverse-proxy/r_p/
nickydream_ DocFraggle Maybe there is the something that we didn’t find out. I can’t run mailcow on 8080: Last login: Tue Mar 26 13:54:02 2024 from 27.18.150.13 root@vmi16215**:~# curl -I http://localhost:8080/ curl: (56) Recv failure: Connection reset by peer root@vmi16215**:~# telnet localhost 8080 Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. Connection closed by foreign host. root@vmi1621588:~#
DocFraggle nickydream_ maybe there’s another service running on port 8080 on your server. Check with netstat -tulpen | grep 8080
nickydream_ DocFraggle Yes. Docker: root@vmi16215**:~# netstat -tulpen | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 0 7674488 1550344/docker-prox
DocFraggle Now I’m confused… your first screenshot shows that you used HTTP_PORT=80 and HTTPS_PORT=443. Did you change that in the meantime? Did you set this like the docs say? HTTP_BIND=127.0.0.1 HTTP_PORT=8080 HTTPS_BIND=127.0.0.1 HTTPS_PORT=8443
nickydream_ DocFraggle Oh sorry. I was trying myself to solve this problem all days. After I posted but before you answered, I had changed the ports to tired. But still failed. This is the newest: In fact, I just changed port, others are same… DocFraggle HTTP_BIND=127.0.0.1 HTTP_PORT=8080 HTTPS_BIND=127.0.0.1 HTTPS_PORT=8443 You said let it empty 🇦 I’m sorry 😅 DocFraggle HTTP_BIND=127.0.0.1 HTTP_PORT=8080 HTTPS_BIND=127.0.0.1 HTTPS_PORT=8443 You said let it empty 🇦 I’m sorry 😅 DocFraggle HTTP_BIND=127.0.0.1 HTTP_PORT=8080 HTTPS_BIND=127.0.0.1 HTTPS_PORT=8443 You said let it empty I’m sorry 😅
DocFraggle Yes, because you put your hostname in there. Normally you can leave it empty, that only matters if you want to bind the ports to a specific IP address on your server
DocFraggle So… why do you want to use a reverse proxy in the first place? Do you have other webservers running on the host?
nickydream_ DocFraggle No. I am a personal web developer. It can save money. I had singly set mailcow without nginx. Successfully. [unknown] I just have a server.
DocFraggle OK, check the nginx container logs: docker compose logs nginx-mailcow Maybe you can see something there. curl on your port 8080 should work at least and show the 301 redirect…
nickydream_ DocFraggle Empty: root@vmi16215**:~# curl -v http://127.0.0.1:8080 Trying 127.0.0.1:8080… TCP_NODELAY set Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) GET / HTTP/1.1 Host: 127.0.0.1:8080 User-Agent: curl/7.68.0 Accept: / Empty reply from server Connection #0 to host 127.0.0.1 left intact curl: (52) Empty reply from server