This repository has been archived by the owner on Aug 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapache.conf
70 lines (60 loc) · 2.16 KB
/
apache.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<VirtualHost *:80>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
#
# GNAF data dump
#
Alias /data /var/www/html/data
<Directory "/var/www/data">
DirectorySlash Off
</Directory>
#
# GNAF ontology code lists
#
RewriteCond %{HTTP_ACCEPT} text/turtle
RewriteRule "/def/gnaf/code/([A-Za-z]+)$" "/def/gnaf/code/$1.ttl" [L]
RewriteCond %{QUERY_STRING} _format=text/turtle [NC]
RewriteRule "/def/gnaf/code/([A-Za-z]+)$" "/def/gnaf/code/$1.ttl" [L]
RewriteRule "/def/gnaf/code/([A-Za-z]+)$" "/def/gnaf/code/$1.html" [L]
#
# GNAF ontology
#
Alias /def/gnaf /var/www/html/def/gnaf
RewriteEngine on
# turtle
RewriteCond %{HTTP_ACCEPT} text/turtle
RewriteRule "/def/gnaf$" "/def/gnaf/gnaf.ttl" [L]
RewriteRule "/def/gnaf.ttl$" "/def/gnaf/gnaf.ttl" [L]
# HTML
RewriteRule "/def/gnaf/$" "/def/gnaf/gnaf.html" [L]
RewriteRule "/def/gnaf$" "/def/gnaf/gnaf.html" [L]
<Directory "/var/www/html/def/gnaf">
DirectorySlash Off
</Directory>
#
# GNAF LD Distribution static metadata
#
# DCAT view
RewriteCond %{QUERY_STRING} _view=dcat
Header set Content-Type text/turtle
RewriteRule ^/$ dcat.ttl? [R=302,L]
# REG view
RewriteCond %{QUERY_STRING} _view=reg
Header set Content-Type text/turtle
RewriteRule ^/$ reg.ttl? [R=302,L]
# VOID view
RewriteCond %{QUERY_STRING} _view=void
Header set Content-Type text/turtle
RewriteRule ^/$ void.ttl? [R=302,L]
#
# GNAF LD Distribution
#
WSGIDaemonProcess gnaf user=www-data threads=5
WSGIScriptAlias / /var/www/gnafldapi/app.wsgi
<Directory /var/www/gnafldapi/>
WSGIProcessGroup gnaf
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
</VirtualHost>