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
/. Note: the
ServerRootvalue in the
[HTTP Server]section of the
virtuoso.iniconfiguration file must also be commented out. One drawback of this approach is that a
robots.txtcan no longer be used to exclude the SPARQL endpoint from crawling.
A redirect to to the
/sparqlVirtual Directory can be added to the
ServerRoot, 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
/sparqlcan be added in the proxy, where it can be managed more readily.