Stardog 2.1 behind reverse proxy.

5 views
Skip to first unread message

Fernando Carpani

unread,
Feb 25, 2014, 5:16:24 PM2/25/14
to sta...@clarkparsia.com
Hello.
I'm trying to use stardog 2.1 community behind Apache as  reverse proxy.

My apache machine is "hogwarts".

my configuration is something like:

ProxyPass /stardogTest http://myserver:10820
ProxyPassReverse /stardogTest http://myserver:10820


When I try to acces to http://hogwarts/stardogTest/mydb, I get in my browser a lot of "bad redirections" like:

http://hogwarts/annex/stardogTest/openDataUY/graph/namespaces

Note the bold face !!!!!

I found that string in

./webconsole/stardogweb/scripts/amd-app.js

How can I resolve this?

thanks.
Fernando Carpani.


Mike Grove

unread,
Feb 26, 2014, 9:11:28 AM2/26/14
to stardog
There was a similar discussion on this topic in an earlier post [1]

Cheers,

Mike




--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Fernando Carpani

unread,
Feb 26, 2014, 1:33:27 PM2/26/14
to sta...@clarkparsia.com
Hello again.
I think that this it's different because:
1) this situation is with 2.1 and the previous is with an older version.
2) the "thing" that modifies the URL's seems to be a js included in the webconsole.
Surely, I don't be clear...

When I require http://hogwarts/stardogTest/mydb, I get some data, but also, I can see in my firebug, a have a  GET over

http://hogwarts/annex/stardogTest/openDataUY/graph/namespaces

There's no configuration on apache that put the annex path...

Every time that I reload the page, I get different data !

This behavior was checked in firefox and chrome.

But if I access to the backend server directly, all works fine.

The reverse proxy configuration have a real path, not only '/' to another server.

Please, someone can help? I have some misconfigured?

Thanks. (and excuse my bad english :-( )
Fdo.

Fernando Hernandez

unread,
Feb 26, 2014, 2:09:53 PM2/26/14
to sta...@clarkparsia.com
Hi,

On Wed, Feb 26, 2014 at 1:33 PM, Fernando Carpani <fernando...@gmail.com> wrote:
Hello again.
I think that this it's different because:
1) this situation is with 2.1 and the previous is with an older version.
2) the "thing" that modifies the URL's seems to be a js included in the webconsole.
Surely, I don't be clear...

When I require http://hogwarts/stardogTest/mydb, I get some data, but also, I can see in my firebug, a have a  GET over

http://hogwarts/annex/stardogTest/openDataUY/graph/namespaces

You would need to set apache proxy so that it points its root to stardog, i.e. you would access the web console 
at http://hogwarts/mydb. Right now it seems that you set  it up to '/stardogTest', which is why the web console 
keeps appending '/stardogTest/openDataUY' to the annex endpoint, when it should be just '/openDataUY'.
 
Cheers,
Fernando

Fernando Carpani

unread,
Feb 27, 2014, 11:45:15 AM2/27/14
to sta...@clarkparsia.com, fern...@clarkparsia.com
Hello.
Thanks "tocayo" :-) .
The problem is that put annex before /stardogTest ... and not that /stardogTest/openDataUY.
I can't follow your suggestion directly.
I work in the Public University in Uruguay.
I'll pretend to give an URL to use in an experiment to construct a semantic catalog of Open Data (for Uruguay).
The stardog is installed in a virtual machine in a server behind firewall, proxies, etc.

Our experimental interface is in javascript, so, is the webclient who connects to the stardog.

I don't need explicitly the webconsole... but I think that if I access to the query or update interface, I'll be in the same situation.... perhaps I'm wrong...

I think that I have 2 options... (may be more :-) ):
1) start an apache server in the same machine of stardog and make 2 proxy reverse (not sounds good thing :) and I have doubt that this option works fine )
2) use a "manual dedicated proxy": a php (by example) which intermediates between the interface and the server. (also not sounds good.... we need to program  that...).

Also, why not put the annex, admin/... etc before the database name to run the same???

Thanks.
FDO.

Fernando Hernandez

unread,
Feb 27, 2014, 12:53:51 PM2/27/14
to sta...@clarkparsia.com
Hi Fernando,

On Thu, Feb 27, 2014 at 11:45 AM, Fernando Carpani <fernando...@gmail.com> wrote:
Hello.
Thanks "tocayo" :-) .
The problem is that put annex before /stardogTest ... and not that /stardogTest/openDataUY.
I can't follow your suggestion directly.
I work in the Public University in Uruguay.
I'll pretend to give an URL to use in an experiment to construct a semantic catalog of Open Data (for Uruguay).
The stardog is installed in a virtual machine in a server behind firewall, proxies, etc.

Our experimental interface is in javascript, so, is the webclient who connects to the stardog.

I don't need explicitly the webconsole... but I think that if I access to the query or update interface, I'll be in the same situation.... perhaps I'm wrong...
 
I'm not sure I follow, but if you already have a working javascript  app perhaps you're better off interacting 
with Stardog directly via the HTTP endpoints [1]. If you wish to use the Annex API, keep in mind that 
the endpoint is http://youstardogserver:yourport/annex/{database}/...
 
I think that I have 2 options... (may be more :-) ):
1) start an apache server in the same machine of stardog and make 2 proxy reverse (not sounds good thing :) and I have doubt that this option works fine )
2) use a "manual dedicated proxy": a php (by example) which intermediates between the interface and the server. (also not sounds good.... we need to program  that...).

If you still need to expose the webconsole via apache reverse proxy, the only thing I can think of is having 
some sort of rewrite rule that gets rid of  the '/stardogTest' part before sending the request to your stardog 
server. In the end, you want your URLs to look like:

http://hogwarts/annex/openDataUY/graph/...

Note that we're not Apache experts and this may or not be entirely possible.

 
Also, why not put the annex, admin/... etc before the database name to run the same???

There is currently no way of manipulating the URLs that the web console produces. The webconsole 
wasn't designed to work behind a proxy like that, which may or not change in future releases.


Cheers,
Fernando 

Fernando Carpani

unread,
Feb 27, 2014, 1:33:39 PM2/27/14
to sta...@clarkparsia.com, fern...@clarkparsia.com
Hello.
I'll try to test the http endpoint and see what happend....
THANKS !!!!!
FDO.
Reply all
Reply to author
Forward
0 new messages