In how to use D2R server in Windows XP, it mentions only about how to publish it as localhost. Here, if we want to use domain name instead of localhost to represent URI, just insert the configuration text below into the mapping file; Remember change the domain to the desired one.
@prefix d2r: <http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#> .
 
<> a d2r:Server;
    rdfs:label "D2R Server";
    d2r:baseURI <http://domain:2020/>;
    d2r:port 2020;
    d2r:documentMetadata [
        rdfs:comment "This comment is custom document metadata.";
    ];
    d2r:vocabularyIncludeInstances true;
    .

If the dataset is huge, retrieving all the results is time consuming. the following code is used to limit the results.
d2rq:resultSizeLimit 500;

For Chem2Bio2RDF, each dataset corresponds with a separate D2R server implemented as a Tomcat servlet with a subdirectory in $CATALINA_HOME/webapps/. In each WEB-INF/web.xml file the paramater "configFile" refers to a custom mapping file (e.g. "mapping.n3"). Each mapping file specifies the corresponding Postgresql database resource and the mapping of tables and columns to RDF. In windows, make sure using URL (file://C:/...) to identify the path of mapping file.

Example:

<> a d2r:Server;
    rdfs:label "D2R Server";
    d2r:baseURI <http://chem2bio2rdf.org/drugbank/>;
    d2r:port 80;
    d2r:documentMetadata [
        rdfs:comment "This comment is custom document metadata.";
    ];
     d2r:vocabularyIncludeInstances true;
    .
 
map:database a d2rq:Database;
    d2rq:jdbcDriver "org.postgresql.Driver";
    d2rq:jdbcDSN "jdbc:postgresql://cheminfov.informatics.indiana.edu/chord";
    d2rq:username "hoosier";
    d2rq:password "**********";
    d2rq:resultSizeLimit 1000;
    .
# Table c2b2r_DrugBankDrug
map:c2b2r_DrugBankDrug a d2rq:ClassMap;
    d2rq:dataStorage map:database;
    d2rq:uriPattern "drugbank_drug/@@c2b2r_DrugBankDrug.DBID|urlify@@";
    d2rq:class drugbank:DrugBankDrug;
    d2rq:classDefinitionLabel "c2b2r_DrugBankDrug";
    .

Refs: