Re: [pgadmin-support] pgadmin4 running behind nginx

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: [pgadmin-support] pgadmin4 running behind nginx
Дата
Msg-id CA+OCxozF=OmyC85k31Aj5t-sy_svht6us0-CF3ogNxdjbbz2vQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgadmin-support] pgadmin4 running behind nginx  (Harshal Dhumal <harshal.dhumal@enterprisedb.com>)
Ответы Re: [pgadmin-support] pgadmin4 running behind nginx
Список pgadmin-support
On Wed, Feb 1, 2017 at 10:11 AM, Harshal Dhumal
<harshal.dhumal@enterprisedb.com> wrote:
> Hi,
>
> When I setup my machine with below server setup and without proxy_redirect I
> got slightly different behaviour. In my case all redirects were failing
> cause browser was redirecting all request to http while server (nginx) was
> configure to serve only https. I didn't get any intermittent state like
> pgAdmin4 front page was loading but other requests (like css, js) was
> failing.
>
> Issue was when pgAdmin4 app returns redirect (301 /302) response to apache
> and apache to nginx; the nginx was returning redirect location header as is
> (i.e. with http protocol as apache was configured to accept only http)
>
> To avoid this I need to rewrite location header at nginx (proxy_redirect)
> before sending it to browser.
>
>         proxy_set_header X-Real-IP  $remote_addr;
>         proxy_set_header X-Forwarded-For $remote_addr;
>         proxy_set_header Host $host;
>         proxy_pass http://127.0.0.1:81;
>         proxy_redirect http:// https://;
>
> With above nginx configuration pgAdmin was loading properly.
>
> Server setup:
>
> Nginx listing at 443 (https only) and forwarding all requests to apache at
> 127.0.0.1:81
> Apache listing at port 81 (http only) with pgAdmin4 wsgi

Nice - thanks Harshal.

Were you able to see why we're trying to load
http://127.0.0.1:5050/login?next=%2Fbrowser%2Fbrowser.css ? I can
reproduce that just by pointing my browser at a dev server (e.g.
werkzeug). No Apache or nginx needed.

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

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



В списке pgadmin-support по дате отправления:

Предыдущее
От: Harshal Dhumal
Дата:
Сообщение: Re: [pgadmin-support] pgadmin4 running behind nginx
Следующее
От: Ashesh Vashi
Дата:
Сообщение: Re: [pgadmin-support] pgadmin4 running behind nginx