On Wed, Nov 22, 2017 at 8:49 AM, Stefan Tzeggai <tzeg...@empirica-systeme.de > wrote:
> > Hi > > Am 21.11.2017 um 21:09 schrieb Dave Page: > > > > > >> On 21 Nov 2017, at 20:06, Stefan Tzeggai <tzeg...@empirica-systeme.de> > wrote: > >> > >> Hi > >> > >> I installed pgAdmin4 2.0 in SERVER-Mode. It listens on Port 5050 by > default. > >> > >> Now I configured Apache2 to proxy external https access to > localhost:5050 > >> > >>> ProxyPass / http://localhost:5050/ timeout=600 > >>> ProxyPassReverse / http://localhost:5050/ timeout=600 > >> > >> The proxying works, but after some cliks, e.g. after the login, pgAdmin4 > >> changes the URL to HTTP without SSL. Hich of course results in an error: > >> > >>> Your browser sent a request that this server could not understand. > >>> Reason: You're speaking plain HTTP to an SSL-enabled server port. > >>> Instead use the HTTPS scheme to access this URL, please. > >> > >> > >> So my question: Is there a way to tell pgAdmin4 that it has an external > >> URL using https ? > >> > >> Thanks > >> Steve > >> > >> > > > > Can you pinpoint what clicks cause this? I haven’t seen the problem and > have a server running this way. > > Actually it starts with the login. I have the HTTPS running on this port > 554. I click the following links: > > https://alfonx.dyndns-ip.com:554/login > OR > https://alfonx.dyndns-ip.com:554/login?next=%2Fbrowser%2F > > Bith both links I get the login page, but after I logged in I end up at: > > http://alfonx.dyndns-ip.com:554/ <- NO HTTPS anymore :-( > Does it behave as expected if you run on 443? FYI, I tried using my docker container (which uses port 443) but mapped it to 554 on the host, and it seems to stick to https. e.g. piranha:~ dpage$ docker run -p 554:443 -v "/Users/dpage/certs/pgadmin.org.pem:/certs/server.cert" -v "/Users/dpage/certs/pgadmin.org.key:/certs/server.key" -e "PGADMIN_DEFAULT_EMAIL=u...@domain.com" -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" -e "PGADMIN_ENABLE_TLS=True" -e "PGADMIN_SERVER_NAME=test.pgadmin.org" -d dpage/pgadmin4 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company