Orbeon path mapping behind reverse proxy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon path mapping behind reverse proxy

Toon Wouters
Hi,

I'm trying to run our Orbeon forms applications behind a reverse proxy under a different context path than the one configured for orbeon.

For example:

Lets say I've configured orbeon with a context of /forms then our apps will be accessible on the application server at:
http://localhost:3000/forms/app1/home
http://localhost:3000/forms/app2/

And I'm trying to make the apps available at http://localhost:8080/test/:
http://localhost:8080/test/app1/home
http://localhost:8080/test/app2/

I'm using Apache and mod_proxy to try and accomplish this. I have the following basic configuration right now:

<Location /myapp/>

        ProxyPassReverse /

</Location>

ProxyPass /test/ http://localhost:3000/forms/

When trying to access http://localhost:8080/test/app1/ however, the browser will redirect to http://localhost:8080/forms/app1/home (because there is a flow defined for this in page-flow.xml) which of course will not work because /forms is not known to the proxy server, only /test is.

Am I doing something wrong? Is there a way to achieve this or is this not possible without also changing the context path for orbeon itself on the application server?

We had already found the oxf.url-rewriting.service.base-uri property, but from the documentation i understand this is only for submissions to services?

Thanks in advance for any additional information on this.

Regards,

Toon

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon path mapping behind reverse proxy

Alessandro  Vernet
Administrator
Hi Toon,

You have a reverse proxy Orbeon Forms doesn't know about, and I think
you're having this issue because the path used when accessing the
reserve proxy (/test) isn't the same as the one used by the reverse
proxy to access Orbeon Forms (/forms).

So when you access /test/, the request to Orbeon Forms is to /forms/,
which redirects to, say, /forms/home/ (with the header Location:
http://localhost:8080/forms/home/ in the response), the reverse proxy
changes the hostname and port when proxying the response back, but not
the path.

You'll also have this problem when a page includes an absolute, like
/forms/path/to/some.css. You could imagine a reverse proxy that tries
to rewrite paths in HTML, CSS, JavaScript... but that would be
complicated and wouldn't always work.

So I think it is just better to use the same path on both sides; if it
is /test that you want exposed, also deploy Orbeon Forms to /test.

Alex

On Thu, May 7, 2015 at 6:15 AM, Toon Wouters <[hidden email]> wrote:

> Hi,
>
> I'm trying to run our Orbeon forms applications behind a reverse proxy under
> a different context path than the one configured for orbeon.
>
> For example:
>
> Lets say I've configured orbeon with a context of /forms then our apps will
> be accessible on the application server at:
> http://localhost:3000/forms/app1/home
> http://localhost:3000/forms/app2/
>
> And I'm trying to make the apps available at http://localhost:8080/test/:
> http://localhost:8080/test/app1/home
> http://localhost:8080/test/app2/
>
> I'm using Apache and mod_proxy to try and accomplish this. I have the
> following basic configuration right now:
>
> <Location /myapp/>
>
>         ProxyPassReverse /
>
> </Location>
>
> ProxyPass /test/ http://localhost:3000/forms/
>
> When trying to access http://localhost:8080/test/app1/ however, the browser
> will redirect to http://localhost:8080/forms/app1/home (because there is a
> flow defined for this in page-flow.xml) which of course will not work
> because /forms is not known to the proxy server, only /test is.
>
> Am I doing something wrong? Is there a way to achieve this or is this not
> possible without also changing the context path for orbeon itself on the
> application server?
>
> We had already found the oxf.url-rewriting.service.base-uri property, but
> from the documentation i understand this is only for submissions to
> services?
>
> Thanks in advance for any additional information on this.
>
> Regards,
>
> Toon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Orbeon Forms" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet