From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Jared Vacanti <jaredvacanti(at)gmail(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4) |
Date: | 2018-11-15 00:56:23 |
Message-ID: | CA+OCxozbh3PrZTmD=Z2thUVHESnqtLWGaK_v3HqvVDdV2fHfmg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi
On Wed, Nov 14, 2018 at 5:50 PM Jared Vacanti <jaredvacanti(at)gmail(dot)com>
wrote:
> Hello Dave, thanks for the quick reply.
>
> I'm using the docker container you maintain available at
> https://hub.docker.com/r/dpage/pgadmin4/ and using nginx as the reverse
> proxy (via proxy_pass & upstreams) - so I'm really forwarding requests to
> the docker container. Would this change then happen via extending the
> Dockerfile?
>
There's some discussion here:
https://redmine.postgresql.org/issues/3149#note-8
and here:
https://redmine.postgresql.org/issues/3149#note-12
That should help I think.
>
> On Wed, Nov 14, 2018 at 3:39 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>> On Wed, Nov 14, 2018 at 4:36 PM Jared Vacanti <jaredvacanti(at)gmail(dot)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?
>>>
>>
>> Yes. See the example at
>> https://www.pgadmin.org/docs/pgadmin4/3.x/server_deployment.html#apache-httpd-configuration-linux-unix.
>> You can simply change the line:
>>
>> 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
>>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Akshay Joshi | 2018-11-15 09:05:54 | [pgAdmin4][Patch]: RM #3723 "Error while starting debugging listener" message displayed if user click on package(function) without body |
Previous Message | Dave Page | 2018-11-14 21:39:18 | Re: Serving pgadmin4 from subdirectory (e.g. example.com/pgadmin4) |