How to change the host name of Service Description RDF?

I set up a Virtuoso RDF store on a cloud server.
When I checked the service description from the command line, the following RDF was returned.

Command

curl -L -H "Accept: text/turtle" "https://xxx.xxx.xxx.co.jp/sparql"

Response

@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ns1:    <http://localhost:8890/sparql#> .
@prefix sd:     <http://www.w3.org/ns/sparql-service-description#> .
ns1:service     rdf:type        sd:Service .
@prefix ns3:    <http://localhost:8890/> .
ns1:service     sd:endpoint     ns3:sparql ;
        sd:feature      sd:DereferencesURIs ,
                sd:UnionDefaultGraph .
@prefix formats:        <http://www.w3.org/ns/formats/> .
ns1:service     sd:resultFormat formats:SPARQL_Results_JSON ,
                formats:SPARQL_Results_XML ,
                formats:Turtle ,
                formats:N-Triples ,
                formats:N3 ,
                formats:RDF_XML ,
                formats:SPARQL_Results_CSV ,
                formats:RDFa ;
        sd:supportedLanguage    sd:SPARQL10Query ;
        sd:url  ns3:sparql .

I would like to change the DNS name from http://localhost:8890 explained in ns1 and ns3 to https://xxx.xxx.xxx.co.jp/sparql. Please tell me how to set it up.

1 Like

The Virtuoso URIQA DefaultHost INI file param sets the “canonical” server name that is used to identify the service. By default it is set to localhost:8890 this you can change to xxx.xxx.xxx.co.jp for that name to be used as the default canonical server name to be use for referencing Linked Data URIs in Virtuoso.

1 Like

@hwilliams Thank you for your kind reply.
However, I tried following the instructions in the reply, but it didn’t work.

First, I made the following settings virtuoso.ini in the virtuoso on my PC for test and restarted the PC, but the curl -L -H "Accept: text/turtle" "http://localhost:8890/sparql" command response did not change.

Case1

[URIQA]
DynamicLocal = 0
DefaultHost  = xxx.xxx.xxx.co.jp

Case2

[URIQA]
DynamicLocal = 0
DefaultHost  = xxx.xxx.xxx.co.jp:8890

Is there a way to check the log to find out why it is not working properly?
Are there any other settings in the virtuoso.ini that need to be changed?

environment
Version 07.20.3240-threads for Win64 as of Nov 11 2024 (ffed4676d)
OS:Windows 11

@shunsuke-kato

Please reset the state of descriptor e.g.

registry_remove('__SPARQL_VHOST_RESET') ;
WS.WS.SPARQL_VHOST_RESET();

Then re-try.

HTH