Files
Montech_Landing/deploy/nginx-montech.ir.conf
T
MahdiandCursor 7e8e1b1f1b Initial Montech monorepo: Nuxt landing, Vue admin, Nest API.
Scaffold SSR site with CMS/blog/gallery/SEO admin and deploy configs for montech.ir.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 18:42:28 +03:30

56 lines
1.4 KiB
Plaintext

# Place under /etc/nginx/sites-available/montech.ir
# Prefer HTTP :80 if SSL terminates on the front proxy (same pattern as CRM).
upstream montech_api {
server 127.0.0.1:3050;
keepalive 8;
}
upstream montech_landing {
server 127.0.0.1:3051;
keepalive 8;
}
server {
listen 80;
listen [::]:80;
server_name montech.ir www.montech.ir;
client_max_body_size 20M;
location /api/ {
proxy_pass http://montech_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 /adm/ {
alias /var/www/montech/apps/adm/dist/;
try_files $uri $uri/ /adm/index.html;
}
# SPA fallback for Vue admin history mode
location = /adm/index.html {
alias /var/www/montech/apps/adm/dist/index.html;
}
location = /adm {
return 301 /adm/;
}
location / {
proxy_pass http://montech_landing;
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_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}