| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- # Apache Virtual Host — Homelegance Chatbot
- # Place at: /etc/httpd/conf.d/homelegance-chat.conf
- # Reload: sudo systemctl reload httpd
- <VirtualHost *:80>
- ServerName chat.homelegance.com
- Redirect permanent / https://chat.homelegance.com/
- </VirtualHost>
- <VirtualHost *:443>
- 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
- <Directory /redant/web/homelegance-chatbot/dist/public>
- Options -Indexes
- AllowOverride None
- Require all granted
- </Directory>
- # 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
- </VirtualHost>
|