Sfoglia il codice sorgente

Merge pull request #269 from Archehandoro/patch-1

Update configuring-well-known.md
pull/270/head
Slavi Pantaleev 6 anni fa
committed by GitHub
parent
commit
ea4ab59489
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 19 aggiunte e 0 eliminazioni
  1. +19
    -0
      docs/configuring-well-known.md

+ 19
- 0
docs/configuring-well-known.md Vedi File

@@ -110,6 +110,25 @@ server {
proxy /.well-known/matrix https://matrix.DOMAIN proxy /.well-known/matrix https://matrix.DOMAIN
``` ```


**For HAProxy**, it would be something like this:

```haproxy
frontend www-https
# Select a Challenge for Matrix federation redirect
acl matrix-acl path_beg /.well-known/matrix/
# Use the challenge backend if the challenge is set
use_backend matrix-backend if matrix-acl
backend matrix-backend
# Redirects the .well-known matrix to the matrix server for federation.
http-request set-header Host matrix.example.com
server matrix matrix.example.com:80
# Map url path as ProxyPass does
reqirep ^(GET|POST|HEAD)\ /.well-known/matrix/(.*) \1\ /\2
# Rewrite redirects as ProxyPassReverse does
acl response-is-redirect res.hdr(Location) -m found
rsprep ^Location:\ (http|https)://matrix.example.com\/(.*) Location:\ \1://matrix.exapmle.com/.well-known/matrix/\2 if response-is-redirect
```

Make sure to: Make sure to:


- **replace `DOMAIN`** in the server configuration with your actual domain name - **replace `DOMAIN`** in the server configuration with your actual domain name


Caricamento…
Annulla
Salva