Everything works fine with CKAN through VPN, but when accessed from the public, CSS cannot not be loaded

偶尔善良 提交于 2019-12-24 11:40:55

问题


I have installed ckan 2.7.1 on ubuntu 14.04 through package by following the official tutorial (http://docs.ckan.org/en/ckan-2.7.0/maintaining/installing/install-from-package.html).

This VM is in our own cloud platform. I have attached a public IP, opened port 8080 and 80 for it. When I accessed the VM through VPN using both private and public IP, everything works well. However, if I type the public IP (http://199.26.254.157/) into the browser with the VPN shut down, I can still see the html page but no CSS. No error message can be found in the error log. In the browser, it is like this

Failed to load resource: the server responded with a status of 416 select2.css(Requested Range Not Satisfiable)

Another thing I am confused with is the port settting in the .ini file. As far as I know, CKAN is launched through Apache and Ngix in this official tutorial, what does 5000 do? I tried changed it to some other number, but it still works.

[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000

回答1:


You'd expect this response if the request had set a Range header (which is unusual and definitely not set in this case).

You said it was on your 'own cloud platform', which makes me suspicious that there is an errant firewall, proxy or load balancer which is causing this header to be added or something. You could configure nginx to log the headers received and see if they are being changed en-route. (Setting up https would prevent interference.) Or you could ask you platform provider to investigate.



来源:https://stackoverflow.com/questions/46774582/everything-works-fine-with-ckan-through-vpn-but-when-accessed-from-the-public

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!