User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
matrix:conduwuit [2025/03/11 08:39] – [Reverse proxy] willymatrix:conduwuit [2025/03/11 08:45] (current) – [Reverse proxy] willy
Line 82: Line 82:
 server { server {
         server_name chat.mydomain.com;         server_name chat.mydomain.com;
 +        # Port 8443 goes to external connection (internet)
         listen 8443 ssl;          listen 8443 ssl; 
 +        # Port 443 is used for internal connections (home)
         listen 443 ssl;          listen 443 ssl; 
         http2 on;         http2 on;
Line 94: Line 96:
  
         location ~ ^(/_matrix|/client) {         location ~ ^(/_matrix|/client) {
 +                # The $request_uri is MANDATORY to avoid URI being modifyed by NGINX
                 proxy_pass                      http://127.0.0.1:6167$request_uri;                 proxy_pass                      http://127.0.0.1:6167$request_uri;
                 proxy_set_header                X-Forwarded-For $remote_addr;                 proxy_set_header                X-Forwarded-For $remote_addr;
Line 102: Line 105:
                 proxy_http_version      1.1;                 proxy_http_version      1.1;
         }         }
 +        # This is needed for federation
         location /.well-known/matrix/server {         location /.well-known/matrix/server {
                 default_type                    application/json;                 default_type                    application/json;
Line 108: Line 111:
                 return                          200 '{"m.server": "chat.mydomain.com:443"}';                 return                          200 '{"m.server": "chat.mydomain.com:443"}';
         }         }
 +        # Enable snail sync for Element X and client access info in general
         location /.well-known/matrix/client {         location /.well-known/matrix/client {
                 default_type                    application/json;                 default_type                    application/json;

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information