Ontology resolver setup
Ontology resolver setup
Resolver for ontology.neuinfo.org
Python scripts to generate nginx include files and nginx configuration for the ontology.neuinfo.org and uri.neuinfo.org resolvers.
This resolver is built to make it possible to resolve fragment identifiers where the fragment is not sent to the server by the browser.
NOTE! There is no way that we can resolve fragment ids without
javascript, anyone advanced enough to be resolving these using a script
should use the uri.neuinfo.org resolver or can convert #
to /
in the
script themselves.
All ttl files are redirected to github master. All owl files are redirected to github xml-final.
nginx setup
- Install the nginx lua module for your system (and optionally also compile nginx with luajit).
git clone https://github.com/pintsized/lua-resty-http.git
to somewhere convenient.
Setup
- Run make_config.py to generate
ontology-uri-map.conf
uri-ilx-map.conf
anduri-scr-map.conf
. - Copy the map conf files and
nif-ont-resolver.conf
into/etc/nginx/
. - Add
include nif-ont-resolver.conf
to the main http section of/etc/nginx/nginx.conf
. - Place
redirect.html
andredirect.js
in/var/www/ontology
(adjust location as needed). - Copy
version-lookup.lua
andjson.lua
into/etc/nginx/
. - Adjust the paths in all the config files to match the locations on your system.
Auxillary services setup
In order to run aux services in ontree.py with caching to take the load off the webserver there is a minimal nginx config that caches gzipped versions of files that are likely to be slow to generate and only change rarely.
nginx setup
mkdir /var/cache/nginx
as root.cp aux-resolver.conf /etc/nginx/
as root.- Delete the default http section in the system default nginx file and
replace it with
include aux-resolver.conf;
.