Ckan 总是重定向到 localhost:5000 [英] Ckan Always redirecting to localhost:5000

查看:38
本文介绍了Ckan 总是重定向到 localhost:5000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个虚拟机(例如,ckan.test.com)并在该机器上设置了 CKAN.在我尝试提交任何表单之前,一切看起来都很好.如果我尝试提交任何表单,它会自动重定向到 localhost:5000.

I have set up a virtual machine(eg., ckan.test.com) and set up CKAN on that machine. Every thing looks fine until i try to submit any form. If i try to submit any form it will automatically redirect to localhost:5000.

例如:登录页面是 http://ckan.test.com/user/login.一旦我输入凭据并登录其重定向到 http://localhost:5000/user/logged_in.如果我用 ckan.test.com 替换 localhost:5000,它会将我带到正确的主页.

Ex: Login page is http://ckan.test.com/user/login. Once i enter credentials and login its redirecting to http://localhost:5000/user/logged_in. If i replace localhost:5000 with ckan.test.com it takes me to the correct home page.

谁能告诉我这是怎么回事

Can any one tell me whats going on

推荐答案

CKAN 表单提交现在具有绝对 重定向链接 - 即包括主机名.CKAN 知道它部署到哪个主机的唯一方法是您在 ckan 配置中放置的内容.因此,在您的 ckan 配置 (ini) 文件中,将选项更改为:

CKAN form submissions now have absolute redirect links - i.e. including the host name. The only way that CKAN knows what host it is deployed to is what you put in your ckan config. So in your ckan config (ini) file change the option to:

ckan.site_url = http://ckan.test.com

而不是http://127.0.0.1:5000.

这篇关于Ckan 总是重定向到 localhost:5000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆