Re: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4) - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4)
Date
Msg-id CA+OCxoz=aVEnfQ0ZsQO2KRTS6Pp4-rYD0PeFRT3Cacui78s6ng@mail.gmail.com
Whole thread Raw
In response to Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4)  (Jared Vacanti <jaredvacanti@gmail.com>)
List pgadmin-hackers
Hi
On Wed, Nov 14, 2018 at 4:36 PM Jared Vacanti <jaredvacanti@gmail.com> wrote:
Is it possible to serve pgadmin4 from a subdirectory instead of at root level? It's easy to serve at pgadmin.example.com - but how about at example.com/pgadmin4 ? Is there any way to set a baseurl at the pgadmin level? 

It looks like two other routes are requested - /static/ and /browser/ - that will break the app because they'll be requested at example.com/static/ instead of example.com/pgadmin4/static/ which is desired. It seems like as long as other applications don't need these subdirectories then pgadmin4 can own them without impacting other services, but it's not a good long-term solution. Then in nginx I can route /static/ and /browser/ directories at the root level to the pgadmin backend, but this is a hack.

Is there any way to serve pgadmin4 from a subdirectory or to change the base_url that is used for the requests in the js/html?


WSGIScriptAlias / /opt/pgAdmin4/web/pgAdmin4.wsgi

to:

WSGIScriptAlias /pgadmin4 /opt/pgAdmin4/web/pgAdmin4.wsgi

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

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

pgadmin-hackers by date:

Previous
From: Jared Vacanti
Date:
Subject: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4)
Next
From: Dave Page
Date:
Subject: Re: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4)