caddy.adoc 889 B

1234567891011121314151617181920212223242526272829303132333435
  1. [#caddy-dns]
  2. = Caddy
  3. include::partial$reverse-proxies/diagram.adoc[]
  4. Caddy seems to work without any special configuration for websockets. If you see websocket disconnects, you may need to increase timeouts; see xref:troubleshooting/err-websocket-connection.adoc#reverse-proxies-will-close-websockets[Reverse proxies will close websockets]. A simple `Caddyfile` works like this;
  5. .Caddyfile
  6. [source,nginx]
  7. ----
  8. http://olivetin.example.com {
  9. reverse_proxy * http://localhost:1337
  10. }
  11. ----
  12. [#caddy-path]
  13. == Custom paths
  14. .Caddyfile
  15. ----
  16. ....
  17. handle {$GLOBAL_PORTAL_PATH}/olivetin* {
  18. redir {$GLOBAL_PORTAL_PATH}/olivetin {$GLOBAL_PORTAL_PATH}/olivetin/
  19. uri strip_prefix {$GLOBAL_PORTAL_PATH}/olivetin
  20. basicauth {
  21. {$GLOBAL_USER} HASH
  22. }
  23. reverse_proxy * localhost:1337
  24. }
  25. ....
  26. ----
  27. include::partial$reverse-proxies/external-rest.adoc[]