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
PATHvalue of the default/sparqlVirtual Directory from/sparqlto/. Note: theServerRootvalue in the[HTTP Server]section of thevirtuoso.iniconfiguration file must also be commented out. One drawback of this approach is that arobots.txtcan no longer be used to exclude the SPARQL endpoint from crawling. -
A redirect to to the
/sparqlVirtual Directory can be added to theindex.htmlin theServerRoot, to redirect/to the existing/sparqlVirtual Directory of the SPARQL endpoint. -
If Virtuoso sits behind a proxy server (Apache, NGINX, etc.) as is commonly the case, a redirect from
/to/sparqlcan be added in the proxy, where it can be managed more readily.