# Apache Location block for HM AI QC on optical-dev. # # Insert inside the existing for # ServerName optical-dev.oliver.solutions # and reload: # sudo systemctl reload apache2 # # Required modules (enable once if not already): # sudo a2enmod proxy proxy_http headers # # The X-Script-Name header is read by wsgi.py's ReverseProxied middleware # so url_for() generates URLs prefixed with /hm-aiqc. ProxyPass /hm-aiqc/ http://127.0.0.1:5050/ ProxyPassReverse /hm-aiqc/ http://127.0.0.1:5050/ # Bare /hm-aiqc (no trailing slash) → redirect with slash so the prefix matches RewriteEngine On RewriteRule ^/hm-aiqc$ /hm-aiqc/ [R=301,L] RequestHeader set X-Script-Name "/hm-aiqc" RequestHeader set X-Forwarded-Proto "https" ProxyPreserveHost On # Long-running endpoints (QC execution, Box searches, video analysis) ProxyTimeout 600