root /var/www/html; location / { try_files $uri /static/$uri @portal; } location /admin_api { try_files none @prosody; } location /invites_api { try_files none @prosody; } location /oauth2 { try_files none @prosody; } location /rest { try_files none @prosody; } location /share { alias /usr/share/javascript; } location /upload { try_files none @prosody; } location @portal { proxy_pass http://${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_HOST}:${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT}; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; } location @prosody { proxy_pass http://${SNIKKET_TWEAK_INTERNAL_HTTP_HOST}:${SNIKKET_TWEAK_INTERNAL_HTTP_PORT}; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; } error_page 502 /_errors/502.html; error_page 503 /_errors/503.html; error_page 504 /_errors/504.html;