0

I had a matrix synapse server set up in a docker container with a Caddy container being the reverse proxy and handling let's encrypt. It has been working just fine.

I am trying to move to Nginx but I am having a little trouble. I set up the reverse proxy and i can access my synapse server from port 80 with 192.168.0.23:80 and it goes to my synapse server even from machines that the synapse server isn't running on.

Here is my default file located in sites-available and linked to sites-enabled:

server {
    listen 80;
    server_name MY_DOMAIN.org;
    location / {
        proxy_pass http://127.0.0.1:8008;
    }
}

And my nginx.conf is as follows:

http {
    include mime.types;
    include /etc/nginx/sites-enabled/*;
}

events {}

This is my docker-compose.yaml:

version: '3'

services:
    synapse:
        image: matrixdotorg/syanpse:latest
        container_name: synapse
        restart: unless-stopped
        ports:
            - 127.0.0.1:8008:8008
        volumes:
            - /home/me/Docker/Synapse/data:/data
        environment:
            - SYNAPSE_SERVER_NAME=my-server-name
            - SYNAPSE_REPORT_STATS=no
            - VIRTUAL_HOST=MY_DOMAIN.org

if I go into my browser and type: http://192.168.0.23 it brings up my matrix server. Yet if I go to http://MY_DOMAIN.org it doesn't load.

Does anyone see something I'm doing wrong?

Both ports 80 and 443 are allowed in ufw. I have read through many posts on reddit and stack exchange and none of the solutions are working. I am using No-IP's dynamic update client to get a DNS record and the same exact client has been working just fine with my original Caddy server so I do not believe it is an issue with No-IP.

I have tried disabling UFW but it still fails. I have checked if SELinux is enabled but it is disabled. I have tried updating the default file in sites-available to listen on MY_PUBLIC_IP:80. I have ports 80 and 443 forwarded in my router and know that the forwarding is working because if I turn the Caddy server back on it has HTTPS enabled.

I have added an entry to my hosts file which lets me access it without need a NAT hairpin but doesn't help accessing it from outside my LAN.

0 Answers0