Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
1.6 KiB
Django/Jinja
47 lines
1.6 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
# HTTPS config for portal.performancewest.net (ERPNext customer portal)
|
|
|
|
server {
|
|
listen 80;
|
|
server_name {{ portal_domain }};
|
|
location /.well-known/acme-challenge/ { root {{ certbot_webroot }}; }
|
|
location / { return 301 https://{{ portal_domain }}$request_uri; }
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name {{ portal_domain }};
|
|
|
|
ssl_certificate /etc/letsencrypt/live/{{ portal_domain }}/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/{{ portal_domain }}/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
|
|
|
client_max_body_size 50m;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:{{ erpnext_port }};
|
|
proxy_http_version 1.1;
|
|
# Must match the Frappe site name so the right site is served
|
|
proxy_set_header Host {{ domain }};
|
|
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 X-Forwarded-Host {{ portal_domain }};
|
|
# WebSocket support (ERPNext real-time)
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 120s;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root {{ certbot_webroot }};
|
|
}
|
|
}
|