You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Peter Lawrence <pe...@inova8.com> on 2014/09/16 21:20:32 UTC

Using Olingo2 behind Apache2 ProxyReversePass

I have created a Olingo2 provider (for SPARQL endpoints).

Within a VM:

I host this on a Tomcat application sever, with URL
http://localhost:8080/olingo2sparql
I then setup Apache2 to avoid CORS problems with the following:

ProxyPass /odata http://localhost:8080/olingo2sparql

ProxyPassReverse /odata http://localhost:8080/olingo2sparql


Outside the VM I can access the OData provider as normal with a URL such as

http://data.server.com/odata/sparql/2.0/lens/$
<http://data.linklaters.com/odata/sparql/2.0/lens/Division?$top=3>metadata

or
http://data.server.com/odata/sparql/2.0/lens/Division?$top=3
<http://data.linklaters.com/odata/sparql/2.0/lens/Division?$top=3>


where data.server.com
<http://data.linklaters.com/odata/sparql/2.0/lens/Division?$top=3> is the
name of the virtual server setup in Apache2


However when I inspect the response I see that the links are exprfessed as
follows:

*http://localhost:8080/olingo2sparql <http://localhost:8080/olingo2sparql>*
/sparql/2.0/lens/Division('server%Adivision%40Management')

instead of the correct link which would be:

*http://data.server.com/odata/ <http://data.server.com/odata/>*
sparql/2.0/lens/Division('server%Adivision%40Management')


Of course the Olingo2sparql provider is unaware of the reverseproxy, so how
can I tell  olingo2 to use the virtual server to formulate the link address
rather than the  local address,


Many thanks for any help

*Peter J. Lawrence*
*inova8*
*Providing answers for users' information questions*
*Mobile:* +1 330 631 3772 | *Phone:* +1 330 342 0582 | *UK Cell*:+44 795
563 2824 |*Skype:* PeterJLawrence
*Email:* peter.lawrence@inova8.com | *Web:* www.inova8.com
*LinkedIn: **http://www.linkedin.com/in/peterjohnlawrence
<http://www.linkedin.com/in/peterjohnlawrence>*