You may need to add 'kpi' to ALLOWED_HOSTS

Installed with kobo-install on Ubuntu 18.04, Workstation with all ports exposed, but also tried without, clean rebuild multiple times… All containers run smoothly, --info is ok.

curl 172.28.66.117

or browser with same address returns empty page, no error message.

Checked logs, all fine, with the exception of:

kpi_1             | Running `kpi` container with `runserver_plus` debugging application server.
kpi_1             |  * Debugger is active!
kpi_1             |  * Debugger PIN: 144-340-922
kpi_1             | Invalid HTTP_HOST header: 'kpi:8000'. You may need to add 'kpi' to ALLOWED_HOSTS.
....

kobocat_1         |   from django.db.models.loading import get_model
kobocat_1         |
kobocat_1         | 172.23.0.4 - - [09/Jun/2020 08:15:56] "GET /service_health/ HTTP/1.0" 200 -
kobocat_1         | Jun  9 08:17:01 kobocat CRON[215]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
kpi_1             |   File "/opt/venv/lib/python3.8/site-packages/django/http/request.py", line 111, in get_host
kpi_1             |     raise DisallowedHost(msg)
kpi_1             | django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'kpi:8000'. You may need to add 'kpi' to ALLOWED_HOSTS.
kpi_1             | Internal Server Error: /service_health/
kpi_1             | 172.23.0.4 - - [09/Jun/2020 08:15:34] "GET /service_health/ HTTP/1.0" 500 -
kpi_1             | Internal Server Error: /service_health/
``` End of log

I found DJANGO_ALLOWED_HOSTS in two variables.

Hi @dmenne,

Regarding your issue You may need to add kpi to ALLOWED_HOSTS:

Not needed. It’s only at the beginning when KoBoCAT starts.

Have a great day!

Hi @Kal_Lam how can I add my domain to ALLOWED_HOSTS ? its my issue now and I cant find any environment to add my domain. Thanks