You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Abdullah KARA <aa...@gmail.com> on 2014/09/12 16:11:24 UTC

Creating public sparql endpoint with fuseki problem

Hi, I have tried to create public sparl endpoint but I didn't.  Downloaded
fuseki to C:\temp (C:\temp\jena-2.12.0\jena-fuseki) and start fuseki with
"fuseki-server --update --mem /ds" command. I put my data (aaa.ttl) on
"C:\temp\jena-2.12.0\jena-fuseki" directory only and give a s-put command
"ruby s-put http://localhost:3030/ds/data default aaa.ttl". It made my data
ready for querying both command prompt and localhost:3030 control panel
directory. http://site/sparql my sparql endpoint and it pass request to
http://localhost3030/dataset/query. For creating public sparql endpoint, apache
reverse proxy configuration must be done. So I created a ".htaccess" folder
at htdocs directory in Apache with the following statements (and I also
change some of the httpd.conf setting off to on ):

RewriteRule ^/sparql$ C:\temp\jena-2.12.0\jena-fuseki\pages\sparql.html [L]

RewriteCond %{QUERY_STRING} query=
RewriteRule . http://localhost:3030/dataset/query
<http://localhost:3030/ds/query> [P]

But it didn't work. "http://localhost:3030/dataset/query
<http://localhost:3030/ds/query>" gives "Error 404: Service Description".
How can I solve this problem and create public sparql endpoint? Is there
any way to make reverse proxy except for apache or nginx? Could you please
tell step by step? Thanks a lot

Re: Creating public sparql endpoint with fuseki problem

Posted by Andy Seaborne <an...@apache.org>.
On 12/09/14 15:11, Abdullah KARA wrote:
> Hi, I have tried to create public sparl endpoint but I didn't.  Downloaded
> fuseki to C:\temp (C:\temp\jena-2.12.0\jena-fuseki) and start fuseki with
> "fuseki-server --update --mem /ds" command. I put my data (aaa.ttl) on
> "C:\temp\jena-2.12.0\jena-fuseki" directory only and give a s-put command
> "ruby s-put http://localhost:3030/ds/data default aaa.ttl". It made my data
> ready for querying both command prompt and localhost:3030 control panel
> directory. http://site/sparql my sparql endpoint and it pass request to
> http://localhost3030/dataset/query. For creating public sparql endpoint, apache
> reverse proxy configuration must be done. So I created a ".htaccess" folder
> at htdocs directory in Apache with the following statements (and I also
> change some of the httpd.conf setting off to on ):
>
> RewriteRule ^/sparql$ C:\temp\jena-2.12.0\jena-fuseki\pages\sparql.html [L]
>
> RewriteCond %{QUERY_STRING} query=
> RewriteRule . http://localhost:3030/dataset/query
> <http://localhost:3030/ds/query> [P]
>
> But it didn't work. "http://localhost:3030/dataset/query
> <http://localhost:3030/ds/query>" gives "Error 404: Service Description".

Oddly, that's a sign that it works.

You need to pass on the query string as well. It looks like you are just 
passing onto the URL withoput the ?query.  Then, with a valid (or 
invalid) query string.

http://...../sparql?query=ASK{}

and you should some get something different.

If you ask without a ?query=, SPARQL protocol says return the service 
description.  But there isn't one (that's currently unsupported) and 
hence you get a 404 but if it says "localhost:3030/ds" it's coming from 
Fuseki.

> How can I solve this problem and create public sparql endpoint? Is there
> any way to make reverse proxy except for apache or nginx? Could you please
> tell step by step? Thanks a lot

	Andy