spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.93k stars 1.05k forks source link

Reverse proxy from apache to integrated Nginx Webserver #1238

Open Happyfeet01 opened 3 years ago

Happyfeet01 commented 3 years ago

Hello,

I try to setup matrix with this setup https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-own-webserver.md#method-2-fronting-the-integrated-nginx-reverse-proxy-webserver-with-another-reverse-proxy

What it the correct setup?

I made an redirect from matrix.domain.tld to http://127.0.0.1:81 Also with element.domain.tld and dimension.domain.tld

With domain must redirect to http://127.0.0.1:8449?

moverduinsecov commented 3 years ago

Hi, You have to edit your webserver config to redirect incoming request to your reverse proxy. So if you define in the webserver config for your matrix domain an redirect to the reverse proxy it should work.

for example (apache config)

    ProxyPass /_matrix http://127.0.0.1:81/_matrix retry=0 nocanon
    ProxyPassReverse /_matrix http://127.0.0.1:81/_matrix
    ProxyPass /_synapse/client http://127.0.0.1:81/_synapse/client retry=0 nocanon
    ProxyPassReverse /_synapse/client http://127.0.0.1:81/_synapse/client

and for your fedaration (redirect traffic from port 8448)

    ProxyPass /_matrix http://127.0.0.1:8449/_matrix retry=0 nocanon
    ProxyPassReverse /_matrix http://127.0.0.1:8449/_matrix

Hope it helps a bit.

Happyfeet01 commented 3 years ago

Oh forgot to close this issue. Everything works fine, only jeetsi Meet and synapse Admin has Problems.

Synapse Admin, open the Page with IP:Port works good, but with admin domain.tld i got an incomplete Page. I don't know whats wrong here.