ServerName veza-web DocumentRoot /var/www/veza # Logging ErrorLog ${APACHE_LOG_DIR}/veza-web-error.log CustomLog ${APACHE_LOG_DIR}/veza-web-access.log combined # Security headers Header always set X-Frame-Options "SAMEORIGIN" Header always set X-Content-Type-Options "nosniff" Header always set X-XSS-Protection "1; mode=block" # Gzip compression AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json # Serve static files Options -Indexes +FollowSymLinks AllowOverride All Require all granted # React Router - serve index.html for all routes RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] # Cache static assets ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType font/woff "access plus 1 year" ExpiresByType font/woff2 "access plus 1 year" ExpiresByType font/ttf "access plus 1 year" ExpiresByType font/eot "access plus 1 year" # API proxy (optional - can be handled by HAProxy) # ProxyPass /api/ http://10.10.10.2:8080/api/ # ProxyPassReverse /api/ http://10.10.10.2:8080/api/ # WebSocket proxy for chat (optional - can be handled by HAProxy) # ProxyPass /ws/ ws://10.10.10.3:8081/ws/ # ProxyPassReverse /ws/ ws://10.10.10.3:8081/ws/ # WebSocket proxy for stream (optional - can be handled by HAProxy) # ProxyPass /stream/ ws://10.10.10.4:3002/stream/ # ProxyPassReverse /stream/ ws://10.10.10.4:3002/stream/