# Shared locations for montech.ir (HTTP + HTTPS) client_max_body_size 20M; location ^~ /.well-known/acme-challenge/ { root /var/www/certbot; default_type "text/plain"; } 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; } 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"; }