alephdata / aleph

Search and browse documents and data; find the people and companies you look for.

Home Page:http://docs.aleph.occrp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] How properly configure nginx reverse proxy for aleph?

zlobniyshurik opened this issue · comments

I try to run aleph v3.15.4 behind nginx reverse-proxy
My nginx.conf

server {
    listen       443 ssl http2;
    server_name  aleph.mydomain.tld;
    <ssl settings>
      location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_pass http://<backend_IP>:8080$request_uri;
    }
}

With ALEPH_UI_URL=http://localhost:8080/ in aleph.env my aleph site partialy working:

  • I can login to https://aleph.mydomain.tld with user created from aleph shell
  • I can upload pictures and docs
  • I can't see uploaded pictures, because picture url starting from http://localhost:8080
  • After logout i redirected to http://localhost:8080

But with ALEPH_UI_URL=https://aleph.mydomain.tld I got non working webUI with tons "Network error" messages

So what is my mistake?

Having the exact same issue here!

commented

I think my friend figured it out–

In aleph.env

ALEPH_UI_URL=https://<domain.com>/
ALEPH_URL_SCHEME=https
ALEPH_FORCE_HTTPS=false

Ideally, this typical configuration should be documented in the FAQ

Hi all, thanks for reporting this. We’re in the process of updating our technical documentation (#3064) and I have added this to the list of things we should document properly.