0

I have my apache configured to proxy some traffic to an internal ip (127.0.0.1:8048). When accessing the internal IP, everything works fine. But when acessing the proxy, I receive:

Failed to connect to matrix.DOMAIN port 8448: Connection timed out

I have port 8448 open in ufw, so I am at a bit of a loss as to what is going wrong here. I would appreciate suggestions on how to investigate this. My apache config is as follows:

# Server-Server (federation) API
# Use this apache reverse proxy template to enable matrix server-to-server federation traffic
# Be sure that network traffic on port 8448 is possible
#
# You can check your federation config at https://federationtester.matrix.org/
# Enter there your base DOMAIN address, NOT your matrix.DOMAIN address, ex. https://DOMAIN
#
# In this example we use all services on the same machine (127.0.0.1) but you can do this with different machines.
# If you do so be sure to reach the destinated IPADRESS and the correspondending port. Check this with netstat, nmap or your favourite tool.
Listen 8448
<VirtualHost *:8448>
        ServerName matrix.bielefeldt.berlin

        SSLEngine On

        # If you manage SSL certificates by yourself, these paths will differ.
        SSLCertificateFile /etc/letsencrypt/live/bielefeldt.berlin-0001/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/bielefeldt.berlin-0001/privkey.pem

        SSLProxyEngine on
        SSLProxyProtocol +TLSv1.2 +TLSv1.3
        SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH

        ProxyPreserveHost On
        ProxyRequests Off
        ProxyVia On
        RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}

        # Proxy all remaining traffic to the Synapse port
        # Beware: In this example the local traffic goes to the local synapse server at 127.0.0.1
        # Of course you can use another IPADRESS in case of using other synapse servers in your network
        AllowEncodedSlashes NoDecode
        ProxyPass /_matrix http://127.0.0.1:8048/_matrix retry=0 nocanon
        ProxyPassReverse /_matrix http://127.0.0.1:8048/_matrix

        ErrorLog ${APACHE_LOG_DIR}/matrix.bielefeldt.berlin-error.log
        CustomLog ${APACHE_LOG_DIR}/matrix.bielefeldt.berlin-access.log combined
</VirtualHost>

0 Answers0