olivas/olivas-apache.conf
Vadym Samoilenko c6cd329c2f Deploy to optical-dev.oliver.solutions
- Update Azure redirect URI and CORS origins to optical-dev
- Remove root requirement from deploy.sh, use chmod instead of chown
- Make CORS_ORIGINS configurable via env var in docker-compose
- Add Apache VirtualHost config for optical-dev.oliver.solutions

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

43 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/olivas
# Required Apache modules: mod_proxy mod_proxy_http mod_rewrite mod_ssl mod_headers
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
# SPA routing — serve index.html for non-file requests
<Directory /var/www/html/olivas>
Options -Indexes +FollowSymLinks
AllowOverride None
Require all granted
RewriteEngine On
RewriteBase /
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>