Re: pgadmin4 running behind nginx - Mailing list pgadmin-support

From Dave Page
Subject Re: pgadmin4 running behind nginx
Date
Msg-id CA+OCxowC52YahBFAvZxD4ePvmRQbttknewLH1zWZkTfr-hHAMw@mail.gmail.com
Whole thread Raw
In response to Re: pgadmin4 running behind nginx  (rhuddbiz <rhuddbiz@gmail.com>)
Responses Re: pgadmin4 running behind nginx  (rhuddbiz <rhuddbiz@gmail.com>)
List pgadmin-support
On Sun, Apr 2, 2017 at 9:00 PM, rhuddbiz <rhuddbiz@gmail.com> wrote:
> how can i specify a path for the python application behind nginx ?  we want
> to enable security with our existing ssl cert .  we have https://foo.com/
> and we want to forward https://foo.com/pgadmin/ to our python wrapper around
> pgadmin4.  unfortunately, the naive approach does not work as the href links
> all appear to be  absolute on the login page.  i'm hoping for a simple env
> variable.

With Apache I just do something like the following, and it just works
(the underlying Flask framework figures out the path prefix
automatically):
   WSGIDaemonProcess pgadmin processes=1 threads=25   WSGIScriptAlias /pgadmin4 /opt/pgAdmin4/web/pgAdmin4.wsgi
   <Directory /opt/pgAdmin4/web>       WSGIProcessGroup pgadmin       WSGIApplicationGroup %{GLOBAL}       Require all
granted  </Directory>
 

I'm afraid I don't know nginx well enough to suggest specifics for that server.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgadmin-support by date:

Previous
From: rhuddbiz
Date:
Subject: Re: pgadmin4 running behind nginx
Next
From: rhuddbiz
Date:
Subject: Re: pgadmin4 running behind nginx