-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx.conf
32 lines (24 loc) · 953 Bytes
/
nginx.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
# Example / drugis.org nginx configuration
server {
listen 80 default_server;
root /var/www/drugis.org/_site;
index index.html;
server_name drugis.org;
rewrite (.*)\.html $1 permanent;
location / {
try_files $uri $uri.html $uri/ =404;
}
location /files/ {
alias /var/www/drugis.org/_files/;
}
error_page 404 /404.html;
## Support for legacy urls
rewrite ^/network-br /resources/publications/network-br permanent;
rewrite ^/smaa-br /resources/publications/smaa-br permanent;
rewrite ^/hitandrun /resources/publications/hitandrun permanent;
rewrite ^/kuopio2011 /resources/publications/kuopio2011 permanent;
rewrite ^/addis([0-9])\.([0-9]*) /software/addis1/addis$1.$2 permanent;
rewrite ^/addis /software/addis1 permanent;
rewrite ^/gemtc /software/r-packages/gemtc permanent;
rewrite ^/publications /resources/publications permanent;
}