mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-25 08:32:23 +08:00
31 lines
1 KiB
Nginx Configuration File
31 lines
1 KiB
Nginx Configuration File
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
server_name #HOST;
|
||
|
ssl_certificate /etc/nginx/certs/cert.pem;
|
||
|
ssl_certificate_key /etc/nginx/certs/key.pem;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://client:3000;
|
||
|
proxy_redirect default;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
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-Host $server_name;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
}
|
||
|
|
||
|
location /api {
|
||
|
proxy_pass http://api:8080;
|
||
|
proxy_redirect default;
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-Host $server_name;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
}
|
||
|
|
||
|
}
|