Is there an existing issue for this?
Environment
- OS:Ubuntu 22.04.5 LTS
- PHP:system default
- LDAP Server:openldap
PLA Code
Docker hub
PLA Version
2.3.11
Current Behavior
When deploying the phpldapadmin container behind a reverse proxy (e.g., Nginx Proxy Manager or Cloudflare) with SSL termination, requests forwarded to the container result in a 502 Bad Gateway error on the reverse proxy.
This is because the internal FrankenPHP/Caddy web server performs strict host header checks/routing. When the external domain name passed in the Host header does not match the internal SERVER_NAME / Caddy route rules, Caddy rejects or ignores the connection, causing NPM to report a 502 error. However, accessing the container locally via curl http://127.0.0.1:8080 returns HTTP 200 OK without issues.
Expected Behavior
- The container should allow requests with arbitrary or external
Host headers by default (catch-all host routing like :80 or :8080), allowing seamless integration with external reverse proxies (NPM, Traefik, Caddy, Cloudflare).
- Alternatively, provide an environment variable (e.g.,
SERVER_NAME=* or a flag to disable strict host matching) so users can easily bypass strict host header checks when running behind a proxy.
Steps To Reproduce
- In an environment with an external reverse proxy (e.g., Nginx Proxy Manager / Caddy) configured for HTTPS/SSL termination for
ldap.example.com.
- Deploy the
phpldapadmin container mapping port 8080 to the host network (e.g., app-net).
- Point the reverse proxy's upstream host/IP to
phpldapadmin:8080.
- Access
https://ldap.example.com from an external browser/client.
- See error: The reverse proxy returns
502 Bad Gateway because FrankenPHP/Caddy inside the container rejects the unrecognized external Host header.
Relevant log output
Anything else?
UI / UX Enhancement Request:
By the way, as a side suggestion for future releases, it would be awesome if the phpLDAPadmin Web UI could receive a modern face-lift/refresh to make the overall interface cleaner, more intuitive, and responsive on modern browsers.
Thanks again to the maintainers for your time and efforts!
Is there an existing issue for this?
Environment
PLA Code
Docker hub
PLA Version
2.3.11
Current Behavior
When deploying the
phpldapadmincontainer behind a reverse proxy (e.g., Nginx Proxy Manager or Cloudflare) with SSL termination, requests forwarded to the container result in a 502 Bad Gateway error on the reverse proxy.This is because the internal FrankenPHP/Caddy web server performs strict host header checks/routing. When the external domain name passed in the
Hostheader does not match the internalSERVER_NAME/ Caddy route rules, Caddy rejects or ignores the connection, causing NPM to report a 502 error. However, accessing the container locally viacurl http://127.0.0.1:8080returns HTTP 200 OK without issues.Expected Behavior
Hostheaders by default (catch-all host routing like:80or:8080), allowing seamless integration with external reverse proxies (NPM, Traefik, Caddy, Cloudflare).SERVER_NAME=*or a flag to disable strict host matching) so users can easily bypass strict host header checks when running behind a proxy.Steps To Reproduce
ldap.example.com.phpldapadmincontainer mapping port8080to the host network (e.g.,app-net).phpldapadmin:8080.https://ldap.example.comfrom an external browser/client.502 Bad Gatewaybecause FrankenPHP/Caddy inside the container rejects the unrecognized externalHostheader.Relevant log output
Anything else?
UI / UX Enhancement Request:
By the way, as a side suggestion for future releases, it would be awesome if the phpLDAPadmin Web UI could receive a modern face-lift/refresh to make the overall interface cleaner, more intuitive, and responsive on modern browsers.
Thanks again to the maintainers for your time and efforts!