Files
crm/deploy/nginx-crm.montzar.ir.conf
T

36 lines
875 B
Plaintext

# Place under /etc/nginx/sites-available/crm.montzar.ir
# First deploy: HTTP only. Then: sudo certbot --nginx -d crm.montzar.ir
#
# 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;
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_read_timeout 120s;
}
location / {
try_files $uri $uri/ /index.html;
}
}