-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update reverse-proxies.rst #5557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Corrected reverse proxying subdirectories with Caddy. Former description would not strip the subdirectory from the reverse proxy target. Changed documentation accordingly. Added an additional paragraph how stripping the subdirectory should be configured in Caddys configuration file. Source: Spent an afternoon figuring this out after unsuccesful application of this doc to a CouchDB+Caddy setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thank you for your contribution. Only a small syntax change is necessary.
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these two (out of three) empty lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the lines and appended the text a bit.
Also line 283 in chapter "Authentication with Caddy 2 as a reverse proxy" possibly contains a mistake when stating "This setup leans entirely on nginx performing...". I'm not sure if it is correct, or it should be "caddy" instead of "nginx", or if the paragraph has been erroneously copied from the identical paragraph in the nginx chapter at line 148 and was accidentally left, so I did not change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch! Looks like a copy/paste error. We would be pleased if you could fix this error at the same time and while you have a working caddy setup, can you test/evaluate the provided config samples if these are correct?
Removed empty lines as requested. Added a short description of the "uri strip_prefix" directive.
To proxy the URL ``http(s)://domain.com/couchdb`` to | ||
``http://localhost:5984`` so that requests appended to the subdirectory, such | ||
as ``http(s)://domain.com/couchdb/db1/doc1`` are proxied to | ||
``http://localhost:5984/db1/doc1``, you have to configure a route in Caddy and strip the subdirectory from the target URI with ``uri strip_prefix``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the linter complains about this long line. please add a line break (max. 90 chars).
Corrected reverse proxying subdirectories with Caddy. Former description would not strip the subdirectory from the reverse proxy target. Changed documentation accordingly. Added an additional paragraph how stripping the subdirectory should be configured in Caddys configuration file. Source: Spent an afternoon figuring this out after unsuccesful application of this doc to a CouchDB+Caddy setup.
Overview
Corrected documentation regarding reverse proxying subdirectories with Caddy. Former description would not strip the subdirectory from the reverse proxy target as described. Changed documentation accordingly. Added an additional paragraph how stripping the subdirectory should be configured in Caddys configuration file. Source: Spent an afternoon figuring this out after unsuccesful application of this doc to a CouchDB+Caddy setup.
Testing recommendations
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.ini
src/docs
folder