HOWTO: Change the published location of a Virtuoso SPARQL Endpoint
In a default Virtuoso installation, the SPARQL endpoint is automatically published at http://CNAME/sparql
. You can enable the SPARQL endpoint to be loaded from the Virtuoso Web Server’s root page (i.e., http://CNAME
) in a number of ways:
-
Use the Conductor’s Web Application → Virtual Directories tab to change the
PATH
value of the default/sparql
Virtual Directory from/sparql
to/
. Note: theServerRoot
value in the[HTTP Server]
section of thevirtuoso.ini
configuration file must also be commented out. One drawback of this approach is that arobots.txt
can no longer be used to exclude the SPARQL endpoint from crawling. -
A redirect to to the
/sparql
Virtual Directory can be added to theindex.html
in theServerRoot
, to redirect/
to the existing/sparql
Virtual Directory of the SPARQL endpoint. -
If Virtuoso sits behind a proxy server (Apache, NGINX, etc.) as is commonly the case, a redirect from
/
to/sparql
can be added in the proxy, where it can be managed more readily.