HOWTO: Change the published location of a Virtuoso SPARQL Endpoint

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:

  1. Use the Conductor’s Web Application → Virtual Directories tab to change the PATH value of the default /sparql Virtual Directory from /sparql to /. Note: the ServerRoot value in the [HTTP Server] section of the virtuoso.ini configuration file must also be commented out. One drawback of this approach is that a robots.txt can no longer be used to exclude the SPARQL endpoint from crawling.

  2. A redirect to to the /sparql Virtual Directory can be added to the index.html in the ServerRoot, to redirect / to the existing /sparql Virtual Directory of the SPARQL endpoint.

  3. 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.

Related