2024-08-21 13:37:53 +00:00
|
|
|
{
|
|
|
|
admin off
|
|
|
|
persist_config off
|
|
|
|
}
|
|
|
|
|
2024-10-28 18:35:52 +00:00
|
|
|
:{$HOPP_AIO_ALTERNATE_PORT:80} {
|
2023-11-22 14:05:35 +00:00
|
|
|
# Serve the `selfhost-web` SPA by default
|
|
|
|
root * /site/selfhost-web
|
|
|
|
file_server
|
|
|
|
|
|
|
|
handle_path /admin* {
|
|
|
|
root * /site/sh-admin-subpath-access
|
|
|
|
file_server
|
|
|
|
|
|
|
|
# Ensures any non-existent file in the server is routed to the SPA
|
|
|
|
try_files {path} /
|
|
|
|
}
|
|
|
|
|
|
|
|
# Handle requests under `/backend*` path
|
|
|
|
handle_path /backend* {
|
|
|
|
reverse_proxy localhost:8080
|
|
|
|
}
|
|
|
|
|
|
|
|
# Catch-all route for unknown paths, serves `selfhost-web` SPA
|
|
|
|
handle {
|
|
|
|
root * /site/selfhost-web
|
|
|
|
file_server
|
|
|
|
try_files {path} /
|
|
|
|
}
|
|
|
|
}
|