social-reporting-tool/deploy/apache-social-reports.conf
DJP 2473c22318 Fix Apache config: remove ProxyTimeout from Location block
ProxyTimeout is not allowed in <Location> context. Moved to server-level
ProxyTimeout directive already set above.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 12:18:02 -04:00

61 lines
2.2 KiB
Text

# Social Reporting — Apache config
# Add this inside your existing VirtualHost for optical-dev.oliver.solutions
# or include it via: Include /opt/social-reporting/deploy/apache-social-reports.conf
# Enable required modules (run once):
# sudo a2enmod proxy proxy_http proxy_wstunnel headers rewrite
# ─── Static frontend ───
Alias /social-reports /var/www/html/social-reporting
<Directory /var/www/html/social-reporting>
Options -Indexes
AllowOverride None
Require all granted
# SPA fallback — serve index.html for unknown paths
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /social-reports/index.html [L]
</Directory>
# ─── Proxy API + SSE + dynamic routes to Node backend ───
ProxyPreserveHost On
ProxyTimeout 600
# Auth API
ProxyPass /social-reports/api/ http://127.0.0.1:3456/api/
ProxyPassReverse /social-reports/api/ http://127.0.0.1:3456/api/
# SSE (long-lived connection — needs no buffering)
ProxyPass /social-reports/events http://127.0.0.1:3456/events
ProxyPassReverse /social-reports/events http://127.0.0.1:3456/events
<Location /social-reports/events>
# Disable buffering for SSE
SetEnv proxy-initial-not-pooled 1
SetEnv proxy-sendchunked 1
SetEnv proxy-sendcl 0
Header set Cache-Control "no-cache"
Header set X-Accel-Buffering "no"
SetOutputFilter NONE
</Location>
# Pipeline run trigger
ProxyPass /social-reports/run http://127.0.0.1:3456/run
ProxyPassReverse /social-reports/run http://127.0.0.1:3456/run
# Status check
ProxyPass /social-reports/status http://127.0.0.1:3456/status
ProxyPassReverse /social-reports/status http://127.0.0.1:3456/status
# Legacy form login (standalone mode fallback)
ProxyPass /social-reports/login http://127.0.0.1:3456/login
ProxyPassReverse /social-reports/login http://127.0.0.1:3456/login
# Legacy logout
ProxyPass /social-reports/logout http://127.0.0.1:3456/logout
ProxyPassReverse /social-reports/logout http://127.0.0.1:3456/logout
# Report viewer
ProxyPassMatch ^/social-reports/report/(.*)$ http://127.0.0.1:3456/report/$1
ProxyPassReverse /social-reports/report/ http://127.0.0.1:3456/report/