# HM AI QC — Apache snippet (Include'd into the per-host vhost). # # Wire-up on each server: # /etc/apache2/sites-enabled/.conf — already exists for OliVAS etc. # Add inside the existing 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 , 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] RequestHeader set X-Script-Name "/hm-aiqc" # Video uploads can exceed the 100MB vhost-wide cap — raise to 500MB here LimitRequestBody 524288000