olivas/olivas-apache.conf
Vadym Samoilenko 91a0104138 Fix frontend base path and Apache config for /olivas/ subpath
- Add base: '/olivas/' to Vite config so assets resolve correctly
- Switch Apache DocumentRoot to /var/www/html with Alias for /olivas/
- Fix RewriteBase to /olivas/ for SPA routing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 13:38:31 +00:00

45 lines
1.4 KiB
Text

<VirtualHost *:80>
ServerName optical-dev.oliver.solutions
Redirect permanent / https://optical-dev.oliver.solutions/
</VirtualHost>
<VirtualHost *:443>
ServerName optical-dev.oliver.solutions
DocumentRoot /var/www/html
# Required Apache modules: mod_proxy mod_proxy_http mod_rewrite mod_ssl mod_headers mod_alias
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/optical-dev.oliver.solutions/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/optical-dev.oliver.solutions/privkey.pem
# Proxy /api/ to FastAPI backend
ProxyPreserveHost On
ProxyPass /api/ http://127.0.0.1:8000/api/
ProxyPassReverse /api/ http://127.0.0.1:8000/api/
# Forward real IP to backend
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader set X-Forwarded-Proto https
# OliVAS SPA — served at /olivas/
Alias /olivas /var/www/html/olivas
<Directory /var/www/html/olivas>
Options -Indexes +FollowSymLinks
AllowOverride None
Require all granted
RewriteEngine On
RewriteBase /olivas/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.html [L]
</Directory>
# Large file uploads (match nginx's 50M)
LimitRequestBody 52428800
ErrorLog ${APACHE_LOG_DIR}/olivas-error.log
CustomLog ${APACHE_LOG_DIR}/olivas-access.log combined
</VirtualHost>