olivas/olivas-apache.conf
Vadym Samoilenko 8484aab187 Fix Apache rewrite — match by extension instead of REQUEST_FILENAME
REQUEST_FILENAME doesn't resolve correctly with Alias; use extension check instead.

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

34 lines
1 KiB
Text

<VirtualHost *:80>
ServerName optical-dev.oliver.solutions
DocumentRoot /var/www/html
# Required Apache modules: mod_proxy mod_proxy_http mod_rewrite mod_headers mod_alias
# 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/proto from load balancer
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_URI} !\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map|json)$
RewriteRule ^ index.html [L]
</Directory>
# Large file uploads (50M)
LimitRequestBody 52428800
ErrorLog ${APACHE_LOG_DIR}/olivas-error.log
CustomLog ${APACHE_LOG_DIR}/olivas-access.log combined
</VirtualHost>