39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
# Place under /etc/nginx/sites-available/crm.montzar.ir
|
|
# Same app for crm.montzar.ir and crm.montact.ir (alias).
|
|
# Front proxy terminates SSL and forwards HTTP :80 here — do not put Certbot-only HTTPS on this box.
|
|
#
|
|
# Do not edit adm.montzar.ir / ktg.montzar.ir / montime vhosts for this.
|
|
|
|
upstream mento_crm_api {
|
|
server 127.0.0.1:3030;
|
|
keepalive 8;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name crm.montzar.ir crm.montact.ir;
|
|
|
|
client_max_body_size 50M;
|
|
|
|
# SPA (Vite build)
|
|
root /var/www/crm/apps/web/dist;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://mento_crm_api;
|
|
proxy_http_version 1.1;
|
|
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_connect_timeout 60s;
|
|
proxy_send_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|