Skip to content

sweetontology.net

Carlos Rueda edited this page Sep 16, 2017 · 12 revisions

Additional settings on the GMU/ECITE server (where the COR is deployed) for purposes of resolving requests against sweetontology.net

New file `/etc/httpd/conf.d/sweetontology.conf:

<VirtualHost *:80>
    ServerName sweetontology.net
    DocumentRoot "/var/www/html/sweetontology.net"
    AliasMatch "/?" "/var/www/html/sweetontology.net/index.html"

    RewriteEngine  On
    RewriteRule    ^/ont ^/ont/.* [L,R=404]
    RewriteRule    /(.+) http://cor.esipfed.org/ont/api/v0/ont?iri=http://sweetontology.net/$1 [P,QSA,NE,L]
</VirtualHost>

Explanation:

  • As a placeholder, created /var/www/html/sweetontology.net/index.html and set an alias for resolution of the domain name itself, http://sweetontology.net.

  • To avoid confusion in case of requests to http://sweetontology.net/ont or http://sweetontology.net/ont/, set a rule to simply respond with 404. Without it, this /ont/? request would be captured in the following rule, resulting in some partial dispatch by the COR, which should simply be avoided.

  • Then comes the key rule for the transparent resolution of http://sweetontology.net/<NAME> via http://cor.esipfed.org/ont/api/v0/ont?iri=http://sweetontology.net/<NAME>

Clone this wiki locally