-
Notifications
You must be signed in to change notification settings - Fork 16
/
doaj-test
122 lines (96 loc) · 3.16 KB
/
doaj-test
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# redirect to SSL version (except xsd schemas)
server {
listen 80;
server_name testdoaj.cottagelabs.com testdoajes.cottagelabs.com staticdoaj.cottagelabs.com;
location =/static/doaj/doajArticle.xsd {
alias /home/cloo/doaj/src/doaj/portality/static/doaj/doajArticles.xsd;
}
location =/static/doaj/iso_639-2b.xsd {
alias /home/cloo/doaj/src/doaj/portality/static/doaj/iso_639-2b.xsd;
}
location /static/crossref {
alias /home/cloo/doaj/src/doaj/portality/static/crossref;
}
location / {
return 301 https://$host$request_uri;
}
}
upstream doaj_apps {
server localhost:5050;
}
upstream doaj_static {
server localhost:5051;
}
upstream doaj_index {
server localhost:9200;
}
# Redirect map for legacy page routes https://github.com/DOAJ/doajPM/issues/2398
map_hash_bucket_size 64;
map $request_uri $new_uri {
include /etc/nginx/doaj-redirects.map;
}
server {
listen 443 ssl;
server_name testdoaj.cottagelabs.com;
# Separate doajtest app htpasswd file to include additional users
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/doajtest_users;
ssl_certificate /etc/letsencrypt/live/testdoaj.cottagelabs.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/testdoaj.cottagelabs.com/privkey.pem;
access_log /var/log/nginx/doaj.access.log;
error_log /var/log/nginx/doaj.error.log;
proxy_read_timeout 600s;
client_max_body_size 50M;
if ($new_uri != "") {
rewrite ^(.*)$ $new_uri permanent;
}
location / {
proxy_pass http://doaj_apps;
}
location =/robots.txt {
alias /home/cloo/doaj/src/doaj/deploy/robots-test.txt;
}
location /static/ {
alias /home/cloo/doaj/src/doaj/portality/static/;
autoindex off;
expires max;
}
}
server {
listen 443 ssl;
server_name staticdoaj.cottagelabs.com;
# Separate doajtest app htpasswd file to include additional users
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/doajtest_users;
ssl_certificate /etc/letsencrypt/live/testdoaj.cottagelabs.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/testdoaj.cottagelabs.com/privkey.pem;
access_log /var/log/nginx/doaj-static.access.log;
error_log /var/log/nginx/doaj-static.error.log;
proxy_read_timeout 600s;
client_max_body_size 50M;
if ($new_uri != "") {
rewrite ^(.*)$ $new_uri permanent;
}
location / {
proxy_pass http://doaj_static;
}
location =/robots.txt {
alias /home/cloo/doaj-static/src/doaj/deploy/robots-test.txt;
}
location /static/ {
alias /home/cloo/doaj-static/src/doaj/portality/static/;
autoindex off;
expires max;
}
}
server {
listen 443 ssl;
server_name testdoajes.cottagelabs.com;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
ssl_certificate /etc/letsencrypt/live/testdoaj.cottagelabs.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/testdoaj.cottagelabs.com/privkey.pem;
location / {
proxy_pass http://doaj_index;
}
}