Hi there,
just installed the DietPi-software synapse server on my running nginx-certbot-nextcloud machine.
As the documentation is unusual lightweight, I’m stuck on howto configure my /etc/nginx/sites-available/default to reverse proxy Synapse via https.
If I understood correctly, this is needed to run Synapse with https encryption.
Any hints on how to configure nginx without breaking nextcloud would be greatly appreciated.
Thanks, Frans
server {
root /var/www;
index index.php index.html index.htm index.nginx-debian.html;
server_name www.mydomain.com;
include /etc/nginx/sites-dietpi/*.conf;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php(?:$|/) {
include snippets/fastcgi-php.conf;
fastcgi_pass php;
}
listen [::]:443 ssl http2 ipv6only=on; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.mydomain.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
}
server {
if ($host = www.mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 default_server;
listen [::]:80 default_server;
server_name www.mydomain.com;
return 404; # managed by Certbot
}