CKAN Frontend doesn't load urls correctly with reverse proxy

14 views
Skip to first unread message

stephenmarkh

unread,
Jan 27, 2022, 4:03:57 PM1/27/22
to CKAN Development Discussions
Good Afternoon all,

I have an Nginx reverse proxy serving CKAN from a URL such as www.example.com/ckan. I can access the link but none of the backend website files are loading in the browser and I get a very broken display.  Here are some details of my environment:

  • nginx/1.20.0
  • ckan/2.9.5 running in docker container exposed port 5000
  • production.ini settings I modified
Attached screenshots of the site rendering in the browser,  http errors from browser, and a snippit of my nginx config. 
website.jpg
404.jpg
nginx.jpg

Matthew Fullerton

unread,
Jan 28, 2022, 8:19:15 AM1/28/22
to stephenmarkh, CKAN Development Discussions
Hi,
Have you tried ending your proxy_pass line with a trailing slash, i.e.
http://ckan/;

Best,
Matt
> --
> ckan-dev mailing list
> ckan...@ckan.org
> https://groups.google.com/a/ckan.org/forum/#!forum/ckan-dev
> Unsubscribe: send an email to ckan-dev+u...@ckan.org
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to ckan-dev+u...@ckan.org.

stephenmarkh

unread,
Jan 28, 2022, 8:26:55 AM1/28/22
to Matthew Fullerton, CKAN Development Discussions
Hi Matthew,

Thanks for the reply! I have tried both with and without the slash on my Nginx config. Also, that screenshot is the same issue I get when I access CKAN without going through the proxy. If I curl <$CKAN_HOST_IP>:5000 I still receive 404's for all the .js and .css.files after making the ckan.root_path configurations. I tailed the logs of the ckan container and saw errors to where it looked like maybe the requests were trying to locate the webasset files that are located @ /var/lib/ckan/webassets at /ckan on the container. So I exec'd into the container and created a symbolic link from / ckan -> /var/lib/ckan, which still didn't fix my issue.

Regards,

Mark
Reply all
Reply to author
Forward
0 new messages