0

I have just installed Synapse on my VPS and now trying to set up nginx reverse proxy. However, it's showing the nginx default page. I have another subdomain with reverse proxy at https://discourse.xinghaizhandui.com which works fine. I checked the configurations files, but don't see any reason why the reverse proxy is not working https://matrix.xinghaizhandui.com. Any thoughts? If I visit http://localhost:8008 with a SSH tunnel, the correct page loads. Attached is the matrix.conf.

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;

listen 8448 ssl http2 default_server;
listen [::]:8448 ssl http2 default_server;

server_name matrix.xinghaizhandui.com;

location ~ ^(/_matrix|/_synapse/client) {
    proxy_pass http://localhost:8008;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 50M;
}
ssl_certificate /etc/letsencrypt/live/xinghaizhandui.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xinghaizhandui.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

1 Answers1

0

Try this

...
location / {
    proxy_pass http://localhost:8008;
...
gapsf
  • 641
  • 1
  • 5
  • 12