:80 { # Ensure VITE_ROOT_BASE_URL in your .env file is 'tableview' (no slashes) handle_path /{$VITE_ROOT_BASE_URL}/* { root * /usr/share/caddy # try_files will attempt to serve the {path} directly. # If {path} (e.g., /assets/app.js after /tableview/ is stripped) is found, it's served. # If {path} (e.g., /some-spa-route after /tableview/ is stripped) is not found, # it falls back to serving /index.html. try_files {path} /index.html # file_server serves the file determined by try_files (either the original asset or index.html). file_server encode gzip } }