0

Here's the config:

server { access_log /var/log/nginx/synapse.access.log; error_log /var/log/nginx/synapse.error.log; server_name synapse.foo.bar; #location ~ ^(/_matrix|/_synapse/client|/_synapse/admin) { location / { proxy_pass http://192.168.10.20:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; client_max_body_size 50M; proxy_http_version 1.1; } listen [::]:443 ssl http2; # managed by Certbot listen 443 ssl http2; # managed by Certbot } 

I'm trying to setup Matrix Synapse and running into some roadblocks. In this case: Some requests work, others don't. Working:

GET https://synapse.foo.bar/_matrix/client/versions GET http://192.168.10.20:8008/_synapse/admin/v1/server_version 

Not working:

https://synapse.foo.bar/_synapse/admin/v1/server_version 

The non-working request yields a 404 to the browser and internally seems to try to serve up a (non-existing) static file:

2025/04/07 08:02:33 [error] 3725600#3725600: *1847520 open() "/usr/share/nginx/html/_synapse/admin/v1/server_version" failed (2: No such file or directory), client: 2.200.175.29, server: synapse.foo.bar, request: "GET /_synapse/admin/v1/server_version HTTP/1.1", host: "synapse.foo.bar" 

I'm not understanding why nginx falls back to a static file instead of trying to serve the request from upstream (like it does for the /client/versions request). From what I understand, the location / should act as a catch-all and route everything upstream (which it does indeed for my other sites). So, where is this coming from?

4
  • Did you restart nginx? Commented Apr 7 at 8:49
  • Since I did not want to break all existing connection, I opted for "service nginx reload"? Commented Apr 7 at 10:12
  • Did reload help? Commented Apr 7 at 15:10
  • Please add output of nginx -T to the question, so we can see full nginx configuration. Commented Apr 7 at 15:37

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.