70 lines
No EOL
2.4 KiB
ApacheConf
70 lines
No EOL
2.4 KiB
ApacheConf
# Apache Virtual Host configuration for Veo Video Generator
|
|
# Add this to your existing Apache virtual host configuration
|
|
|
|
# Enable required modules (add to main Apache config):
|
|
# LoadModule proxy_module modules/mod_proxy.so
|
|
# LoadModule proxy_http_module modules/mod_proxy_http.so
|
|
# LoadModule rewrite_module modules/mod_rewrite.so
|
|
# LoadModule headers_module modules/mod_headers.so
|
|
|
|
# Backend proxy configuration
|
|
ProxyPreserveHost On
|
|
ProxyRequests Off
|
|
|
|
# Backend API proxy
|
|
ProxyPass /veo_back/ http://127.0.0.1:7394/
|
|
ProxyPassReverse /veo_back/ http://127.0.0.1:7394/
|
|
|
|
# Set proxy headers for backend
|
|
ProxyPassReverse /veo_back/ http://127.0.0.1:7394/
|
|
<Location "/veo_back/">
|
|
ProxyPreserveHost On
|
|
ProxyAddHeaders On
|
|
RequestHeader set X-Forwarded-Proto "https"
|
|
RequestHeader set X-Forwarded-Port "443"
|
|
|
|
# Increase timeout for long video generation requests
|
|
ProxyTimeout 600
|
|
|
|
# Handle CORS preflight requests
|
|
Header always set Access-Control-Allow-Origin "https://ai-sandbox.oliver.solutions"
|
|
Header always set Access-Control-Allow-Methods "GET, POST, DELETE, OPTIONS"
|
|
Header always set Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
|
|
Header always set Access-Control-Max-Age "1728000"
|
|
|
|
# Handle OPTIONS requests
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_METHOD} OPTIONS
|
|
RewriteRule ^(.*)$ $1 [R=204,L]
|
|
</Location>
|
|
|
|
# Frontend static files
|
|
Alias /veo /path/to/your/web/server/veo
|
|
<Directory "/path/to/your/web/server/veo">
|
|
Options -Indexes +FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
|
|
# Handle React Router (SPA routing)
|
|
RewriteEngine On
|
|
RewriteBase /veo/
|
|
RewriteRule ^index\.html$ - [L]
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule . /veo/index.html [L]
|
|
|
|
# Cache static assets
|
|
<FilesMatch "\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$">
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 1 year"
|
|
Header set Cache-Control "public, immutable"
|
|
</FilesMatch>
|
|
|
|
# Security headers
|
|
Header always set X-Frame-Options "SAMEORIGIN"
|
|
Header always set X-Content-Type-Options "nosniff"
|
|
Header always set X-XSS-Protection "1; mode=block"
|
|
</Directory>
|
|
|
|
# Increase max request size for potential uploads
|
|
LimitRequestBody 52428800 |