Skip to content

docs: add Caddy reverse proxy configuration examples - #10344

Open
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:caddy-docs-10334
Open

docs: add Caddy reverse proxy configuration examples#10344
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:caddy-docs-10334

Conversation

@dpage

@dpage dpage commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Caddy examples alongside the existing NGINX ones for hosting pgAdmin with Gunicorn or uWSGI, both at the root of a server and under a sub-directory (mirroring the structure of the existing NGINX sections).
  • Documents the two things that must line up for a sub-directory deployment behind any reverse proxy, not just Caddy: the proxy forwarding the request path unmodified with an X-Script-Name header, and a SCRIPT_NAME environment variable set on the pgAdmin process itself (a separate, static mechanism that sets APPLICATION_ROOT/SESSION_COOKIE_PATH).

Related: #10334, where the reported "login succeeds then bounces back to the login page" turned out to be caused by the missing SCRIPT_NAME process environment variable, not by cookie security flags.

Test plan

  • make docs equivalent (targeted sphinx-build) with no new warnings for server_deployment.rst
  • Verified the documented Caddy config end-to-end locally: pgAdmin running under /pgadmin4 behind a local Caddy instance, full browser login → dashboard → reload cycle with no console errors and no redirect loop

Summary by CodeRabbit

  • Documentation
    • Added deployment guidance for running Gunicorn and uWSGI behind Caddy.
    • Included examples for root and /pgadmin4 subdirectory deployments.
    • Documented Unix-socket reverse proxying, path matching, and URL prefix configuration.
    • Clarified that uWSGI deployments with Caddy should use HTTP mode.

Adds Caddy examples alongside the existing NGINX ones for hosting
pgAdmin with Gunicorn or uWSGI, at the root of a server and under a
sub-directory. Addresses pgadmin-org#10334, where the root cause turned out to
be that a sub-directory deployment needs both the reverse proxy to
forward the request path unmodified with an X-Script-Name header, and
the SCRIPT_NAME environment variable set on the pgAdmin process itself
so APPLICATION_ROOT/SESSION_COOKIE_PATH are correct.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 092e4c62-dd3a-4411-a3f4-5e8dce373c04

📥 Commits

Reviewing files that changed from the base of the PR and between bc58657 and fe60c94.

📒 Files selected for processing (1)
  • docs/en_US/server_deployment.rst

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

Added Caddy deployment documentation for Gunicorn and uWSGI. The examples cover root and /pgadmin4 sub-directory deployments, Unix sockets, path matching, X-Script-Name, and SCRIPT_NAME.

Changes

Caddy deployment

Layer / File(s) Summary
Gunicorn Caddy configuration
docs/en_US/server_deployment.rst
Added root and /pgadmin4 sub-directory reverse-proxy instructions for Gunicorn. The examples configure path matching, SCRIPT_NAME, and X-Script-Name.
uWSGI Caddy configuration
docs/en_US/server_deployment.rst
Added uWSGI deployment instructions that use HTTP-socket mode. The sub-directory example mounts /pgadmin4, sets SCRIPT_NAME, preserves the request path, and forwards X-Script-Name.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to fe60c

This change adds Caddy reverse-proxy examples and deployment guidance without changing product behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Caddy reverse proxy configuration examples to the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant