Matrix Sprint: nginx config for matrix.buryans.ru (task #18)

This commit is contained in:
root committed 2026-09-25 13:52:54 +03:00
1 parent 6855f3e4df
commit 086cc8f90f
1 file changed
+36
+36
View File
@@ -0,0 +1,36 @@
# Nginx конфиг для matrix.buryans.ru
# Расположение на VPS: /etc/nginx/sites-available/matrix.buryans.ru
server {
listen 80;
listen [::]:80;
server_name matrix.buryans.ru;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
http2 on;
server_name matrix.buryans.ru;
ssl_certificate /etc/letsencrypt/live/matrix.buryans.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/matrix.buryans.ru/privkey.pem;
location / {
proxy_pass http://192.168.1.155:8008;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}