44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
# ===============================
|
|
# HTTP - redirect sang HTTPS
|
|
# ===============================
|
|
server {
|
|
listen 80;
|
|
server_name bkmeeting.soict.io;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
# ===============================
|
|
# HTTPS Reverse Proxy
|
|
# ===============================
|
|
server {
|
|
listen 443 ssl;
|
|
server_name bkmeeting.soict.io;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/bkmeeting.soict.io/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/bkmeeting.soict.io/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
# ===========================
|
|
# Proxy đến frontend (React)
|
|
# ===========================
|
|
location / {
|
|
proxy_pass http://frontend:80;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# ===========================
|
|
# Proxy đến backend (Node.js)
|
|
# ===========================
|
|
location /api/ {
|
|
proxy_pass http://backend:5000/;
|
|
proxy_http_version 1.1;
|
|
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;
|
|
}
|
|
}
|