ProxyTimeout cannot be set inside <Location>. Express the per-route timeout via the timeout= parameter on ProxyPass instead, matching the ppt-tool pattern in the optical-dev vhost.
37 lines
1.4 KiB
Text
37 lines
1.4 KiB
Text
# HM AI QC — Apache snippet (Include'd into the per-host vhost).
|
|
#
|
|
# Wire-up on each server:
|
|
# /etc/apache2/sites-enabled/<host>.conf — already exists for OliVAS etc.
|
|
# Add inside the existing <VirtualHost *:80> block (next to the other
|
|
# per-app Include lines):
|
|
#
|
|
# Include /opt/hm-aiqc/deploy/apache-hm-aiqc.conf
|
|
#
|
|
# Then: sudo apache2ctl configtest && sudo systemctl reload apache2
|
|
#
|
|
# Required modules (enable once if not already):
|
|
# sudo a2enmod proxy proxy_http headers rewrite
|
|
#
|
|
# This server fronts plain HTTP only — SSL is terminated by the upstream
|
|
# load balancer. The parent vhost already sets X-Forwarded-Proto: https
|
|
# and ProxyPreserveHost On globally, so we don't repeat them here.
|
|
#
|
|
# X-Script-Name is read by wsgi.py's ReverseProxied middleware so Flask's
|
|
# url_for() emits /hm-aiqc/... prefixes correctly.
|
|
|
|
# Long-running endpoints (QC execution, Box searches, video analysis)
|
|
# expressed as a per-route timeout on ProxyPass (ProxyTimeout itself is
|
|
# not allowed inside <Location>, hence inline).
|
|
ProxyPass /hm-aiqc/ http://127.0.0.1:5050/ timeout=600
|
|
ProxyPassReverse /hm-aiqc/ http://127.0.0.1:5050/
|
|
|
|
# /hm-aiqc (no trailing slash) → /hm-aiqc/
|
|
RewriteEngine On
|
|
RewriteRule ^/hm-aiqc$ /hm-aiqc/ [R=301,L]
|
|
|
|
<Location /hm-aiqc/>
|
|
RequestHeader set X-Script-Name "/hm-aiqc"
|
|
|
|
# Video uploads can exceed the 100MB vhost-wide cap — raise to 500MB here
|
|
LimitRequestBody 524288000
|
|
</Location>
|