Created
July 12, 2021 14:32
-
-
Save austonpramodh/41c272693f5594751150e7a89c8aeaf9 to your computer and use it in GitHub Desktop.
Caddyfile for portainer and pgadmin4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| # Global options block. Entirely optional, https is on by default | |
| # Optional email key for lets encrypt | |
| email [email protected] | |
| # Optional staging lets encrypt for testing. Comment out for production. | |
| # acme_ca https://acme-staging-v02.api.letsencrypt.org/directory | |
| } | |
| :80 { | |
| handle /portainer* { | |
| redir /portainer /portainer/ permanent | |
| uri strip_prefix /portainer | |
| reverse_proxy portainer:9000 | |
| } | |
| handle /pgadmin4* { | |
| redir /pgadmin4 /pgadmin4/ permanent | |
| reverse_proxy pgadmin4:80 { | |
| # pgadmin required this | |
| header_up X-Scheme {scheme} | |
| header_up X-Script-Name "/pgadmin4" | |
| header_up X-Real-IP {remote} | |
| header_up X-Forwarded-Proto {scheme} | |
| } | |
| } | |
| handle { | |
| respond "Hi There, Voila it works!!" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
This gist is really great for pgadmin reverse_proxy.
do not miss to add
header_up Redirect offon the reverse_proxy directive