pgAdmin (on Ubuntu) via Application Access #5952
colinedwardwood
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Certain web applications require slight modifications to their configuration to make them work smoothly with Application Access. I discovered pgAdmin is one of those applications.
Here is my example configuration.
Install pgAdmin
I installed pgAdmin on my Ubuntu 18.04.5 LTS system as follows:
Setup the repository
Install the public key for the repository (if not done previously):
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
Create the repository configuration file:
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
Install pgAdmin for web mode only:
sudo apt install pgadmin4-web
Configure the webserver, if you installed pgadmin4-web:
sudo /usr/pgadmin4/bin/setup-web.sh
Setup Teleport Application Access
On the same node, I installed the Teleport app service.
Handle Redirect Issue
pgAdmin will not render the javascript and will return an error of "The referrer does not match the host" if config changes are not made.
To get around this issue edit the file
/usr/pgadmin4/web/config.py
.Change the line
to
To effect the change, restart apache.
sudo systemctl restart apache2
pgAdmin should now be accessible and correctly rendering javascript.
Beta Was this translation helpful? Give feedback.
All reactions