aio-subpath-access.Caddyfile 694 B

1234567891011121314151617181920212223242526272829303132333435
  1. {
  2. admin off
  3. persist_config off
  4. }
  5. :{$HOPP_AIO_ALTERNATE_PORT:80} {
  6. # Serve the `selfhost-web` SPA by default
  7. root * /site/selfhost-web
  8. file_server
  9. handle_path /admin* {
  10. root * /site/sh-admin-subpath-access
  11. file_server
  12. # Ensures any non-existent file in the server is routed to the SPA
  13. try_files {path} /
  14. }
  15. # Handle requests under `/backend*` path
  16. handle_path /backend* {
  17. reverse_proxy localhost:8080
  18. }
  19. # Handle requests under `/desktop-app-server*` path
  20. handle_path /desktop-app-server* {
  21. reverse_proxy localhost:3200
  22. }
  23. # Catch-all route for unknown paths, serves `selfhost-web` SPA
  24. handle {
  25. root * /site/selfhost-web
  26. file_server
  27. try_files {path} /
  28. }
  29. }