# Apache Virtual Host — Homelegance Chatbot # Place at: /etc/httpd/conf.d/homelegance-chat.conf # Reload: sudo systemctl reload httpd ServerName chat.homelegance.com Redirect permanent / https://chat.homelegance.com/ ServerName chat.homelegance.com SSLEngine on SSLCertificateFile /etc/ssl/certs/homelegance.crt SSLCertificateKeyFile /etc/ssl/private/homelegance.key Header always set X-Content-Type-Options nosniff Header always set X-Frame-Options SAMEORIGIN Header always set Referrer-Policy strict-origin-when-cross-origin # Static files served directly by Apache DocumentRoot /redant/web/homelegance-chatbot/dist/public Options -Indexes AllowOverride None Require all granted # API requests proxied to Node.js ProxyPreserveHost On ProxyPass /api http://127.0.0.1:3000/api ProxyPassReverse /api http://127.0.0.1:3000/api # SPA fallback — non-file requests return index.html RewriteEngine On RewriteCond %{REQUEST_URI} !^/api/ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^ /index.html [L] ErrorLog /var/log/httpd/homelegance-chat-error.log CustomLog /var/log/httpd/homelegance-chat-access.log combined