[ckan-dev] CKAN on dispatched app server

David Read david.read at okfn.org
Thu Sep 29 15:52:39 UTC 2011


On 29 September 2011 16:13, Florian Marienfeld <
florian.marienfeld at fokus.fraunhofer.de> wrote:

> On 29.09.11 16:34, David Read wrote:
> >
> >
> > On 29 September 2011 14:23, Florian Marienfeld
> > <florian.marienfeld at fokus.fraunhofer.de
> > <mailto:florian.marienfeld at fokus.fraunhofer.de>> wrote:
> >
> >     Hey,
> >
> >     has any one dispatched calls from a web server to CKAN machine based
> on
> >     the URL?
> >
> >     The idea is to tell one internet-visible host to proxy-pass http
> calls
> >     that ask for http://webserver/ckan to http://ckan-server/ . I
> adjusted
> >     ckan.site_url accordingly, but this does not effect links: Package
> will
> >     link still link to http://webserver/package instead of
> >     http//webserver/ckan/package.
> >
> >
> > So browsers talk to Server A, which passes requests onto Server B which
> > is running CKAN. The problem is that the page is returned with links
> > that go directly to Server B, but you want them to go via Server A?
>
> kind of: the links do not have the path prefix /ckan/ which triggers the
> dispatching


We use Routes for generating our URLs and I see it has a URL prefix option.
It also appears to be pretty easy to set up. See:
http://wiki.pylonshq.com/display/pylonsdocs/Configuration+Files (under
PrefixMiddleware)
Just by putting in these four lines into the config file gives you a prefix
to the relative urls in CKAN. It appears to work ok for me, but there may be
occasions when we have hard-coded things though, so if you spot any, let us
know.

David


> > Most internal CKAN links are just relative though. e.g. "/dataset". I'm
> > surprised the browser is using the domain of Server B rather than of
> > Server A, because the proxy is passing it the page. Perhaps someone else
> > knows about this? Perhaps it's something to do with the proxy setup?
>
> The domain is constant. I was kind of expecting that the links were not
> relative but prefixed with ${site_url}. but you know what, I will try to
> fiddle in a <base>-tag.
>
> Thanks in any event!
>
> Best,
>
> FLO
>
>
>
> >
> > David
> >
> >
> >     Is there a way to configure this properly, or work around?
> >
> >     This is ckan 1.4.2a as through APT.
> >
> >     Best regards,
> >
> >     FLO
> >
> >     --
> >     Florian Marienfeld
> >     Dipl.-Ing. Tech.-Inf.
> >
> >     Fraunhofer FOKUS
> >     - CC Motion -
> >     Kaiserin-Augusta-Allee 31
> >     10589 Berlin
> >     +49 30 3463 7127 <tel:%2B49%2030%203463%207127>
> >
> >
> >     _______________________________________________
> >     ckan-dev mailing list
> >     ckan-dev at lists.okfn.org <mailto:ckan-dev at lists.okfn.org>
> >     http://lists.okfn.org/mailman/listinfo/ckan-dev
> >
> >
> >
> >
> > _______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110929/9e0acecf/attachment-0001.html>


More information about the ckan-dev mailing list