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>
This commit is contained in:
parent
ce1d10d9b2
commit
91a0104138
2 changed files with 7 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'
|
|||
import tailwindcss from '@tailwindcss/vite'
|
||||
|
||||
export default defineConfig({
|
||||
base: '/olivas/',
|
||||
plugins: [react(), tailwindcss()],
|
||||
server: {
|
||||
port: 1577,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName optical-dev.oliver.solutions
|
||||
|
||||
DocumentRoot /var/www/html/olivas
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
# Required Apache modules: mod_proxy mod_proxy_http mod_rewrite mod_ssl mod_headers
|
||||
# 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
|
||||
|
|
@ -23,13 +23,15 @@
|
|||
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
|
||||
RequestHeader set X-Forwarded-Proto https
|
||||
|
||||
# SPA routing — serve index.html for non-file requests
|
||||
# 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 /
|
||||
RewriteBase /olivas/
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.html [L]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue