]> Git — Sourcephile - gargantext.git/blob - devops/nginx/frames/default
[VERSION] +1 to 0.0.4.8.2
[gargantext.git] / devops / nginx / frames / default
1 ##
2 # You should look at the following URL's in order to grasp a solid understanding
3 # of Nginx configuration files in order to fully unleash the power of Nginx.
4 # https://www.nginx.com/resources/wiki/start/
5 # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
6 # https://wiki.debian.org/Nginx/DirectoryStructure
7 #
8 # In most cases, administrators will remove this file from sites-enabled/ and
9 # leave it as reference inside of sites-available where it will continue to be
10 # updated by the nginx packaging team.
11 #
12 # This file will automatically load configuration files provided by other
13 # applications, such as Drupal or Wordpress. These applications will be made
14 # available underneath a path with that package name, such as /drupal8.
15 #
16 # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
17 ##
18
19 # Default server configuration
20 #
21
22 #upstream backend_istex{
23 # server 127.0.0.1:8080;
24 #}
25
26
27 #upstream backend_cillex{
28 # server 127.0.0.1:7080;
29 #}
30
31 #events {
32 # worker_connections 2000;
33 #}
34
35
36
37 server {
38 server_name write.frame.gargantext.org;
39 location / {
40 # include proxy_params;
41 proxy_pass http://localhost:3000;
42 # proxy_http_version 1.1;
43 # proxy_set_header Upgrade $http_upgrade;
44 # proxy_set_header Connection "upgrade";
45 # proxy_set_header Host $host;
46 # proxy_cookie_path / "/; secure; HttpOnly; SameSite=lax";
47
48 #proxy_set_header X-Real-IP $remote_addr;
49 # proxy_cookie_domain $host $host;
50 # proxy_ignore_headers Cache-Control Expires Set-Cookie;
51 }
52
53 location /socket.io {
54 proxy_pass http://localhost:3000;
55 proxy_http_version 1.1;
56 proxy_set_header Upgrade $http_upgrade;
57 proxy_set_header Connection "Upgrade";
58 proxy_set_header Host $host;
59 }
60
61 listen 443 ssl; # managed by Certbot
62 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
63 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
64 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
65 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
66
67
68 }
69
70
71 server {
72 server_name write2.frame.gargantext.org;
73 location / {
74 # include proxy_params;
75 proxy_pass http://localhost:3001;
76 # proxy_http_version 1.1;
77 # proxy_set_header Upgrade $http_upgrade;
78 # proxy_set_header Connection "upgrade";
79 # proxy_set_header Host $host;
80 # proxy_cookie_path / "/; secure; HttpOnly; SameSite=lax";
81
82 #proxy_set_header X-Real-IP $remote_addr;
83 # proxy_cookie_domain $host $host;
84 # proxy_ignore_headers Cache-Control Expires Set-Cookie;
85 }
86
87 listen 443 ssl; # managed by Certbot
88 ssl_certificate /etc/letsencrypt/live/write2.frame.gargantext.org/fullchain.pem; # managed by Certbot
89 ssl_certificate_key /etc/letsencrypt/live/write2.frame.gargantext.org/privkey.pem; # managed by Certbot
90 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
91 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
92
93 }
94
95
96
97
98
99
100
101 server {
102 server_name calc.frame.gargantext.org;
103 location / {
104 include proxy_params;
105 proxy_pass http://localhost:8000;
106 }
107
108 listen 443 ssl; # managed by Certbot
109 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
110 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
111 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
112 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
113
114
115 }
116
117
118 #server {
119 # server_name hackmd.gargantext.org;
120 # location / {
121 # include proxy_params;
122 # proxy_pass http://localhost:8000;
123 # }
124 #
125 # listen 443 ssl; # managed by Certbot
126 # ssl_certificate /etc/letsencrypt/live/cillex.gargantext.org/fullchain.pem; # managed by Certbot
127 # ssl_certificate_key /etc/letsencrypt/live/cillex.gargantext.org/privkey.pem; # managed by Certbot
128 # include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
129 # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
130 #
131 #}
132
133
134
135 server {
136 server_name istex.frame.gargantext.org;
137 location / {
138 include proxy_params;
139 proxy_pass http://localhost:8080;
140 }
141
142 listen 443 ssl; # managed by Certbot
143 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
144 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
145 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
146 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
147
148
149
150
151 }
152
153
154 server {
155 server_name istex.gargantext.org;
156 location / {
157 include proxy_params;
158 proxy_pass http://localhost:8080;
159 }
160
161 listen 443 ssl; # managed by Certbot
162 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
163 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
164 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
165 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
166
167
168
169
170 }
171
172
173 server {
174 server_name searx.frame.gargantext.org;
175 location / {
176 include proxy_params;
177 proxy_pass http://localhost:8181;
178 }
179
180 listen 443 ssl; # managed by Certbot
181 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
182 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
183 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
184 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
185
186
187
188
189
190 }
191
192
193 # Virtual Host configuration for example.com
194 #
195 # You can move that to a different file under sites-available/ and symlink that
196 # to sites-enabled/ to enable it.
197 #
198 #server {
199 # listen 80;
200 # listen [::]:80;
201 #
202 # server_name example.com;
203 #
204 # root /var/www/example.com;
205 # index index.html;
206 #
207 # location / {
208 # try_files $uri $uri/ =404;
209 # }
210 #}
211
212
213
214 server {
215 if ($host = cillex.gargantext.org) {
216 return 301 https://$host$request_uri;
217 } # managed by Certbot
218
219
220 server_name cillex.gargantext.org;
221 return 404; # managed by Certbot
222
223
224
225 listen 443 ssl; # managed by Certbot
226 ssl_certificate /etc/letsencrypt/live/searx.frame.gargantext.org/fullchain.pem; # managed by Certbot
227 ssl_certificate_key /etc/letsencrypt/live/searx.frame.gargantext.org/privkey.pem; # managed by Certbot
228 include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
229 ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
230
231
232 }
233
234
235
236 server {
237 if ($host = searx.frame.gargantext.org) {
238 return 301 https://$host$request_uri;
239 } # managed by Certbot
240
241
242 server_name searx.frame.gargantext.org;
243 listen 80;
244 return 404; # managed by Certbot
245
246 }
247
248
249 server {
250 if ($host = istex.frame.gargantext.org) {
251 return 301 https://$host$request_uri;
252 } # managed by Certbot
253
254
255 server_name istex.frame.gargantext.org;
256 listen 80;
257 return 404; # managed by Certbot
258
259 }
260
261
262 server {
263 if ($host = calc.frame.gargantext.org) {
264 return 301 https://$host$request_uri;
265 } # managed by Certbot
266
267
268 server_name calc.frame.gargantext.org;
269 listen 80;
270 return 404; # managed by Certbot
271
272 }
273
274 server {
275 if ($host = write.frame.gargantext.org) {
276 return 301 https://$host$request_uri;
277 } # managed by Certbot
278
279
280 server_name write.frame.gargantext.org;
281 listen 80;
282 return 404; # managed by Certbot
283
284 }
285
286 server {
287 if ($host = write2.frame.gargantext.org) {
288 return 301 https://$host$request_uri;
289 } # managed by Certbot
290
291
292 server_name write2.frame.gargantext.org;
293 listen 80;
294 return 404; # managed by Certbot
295
296 }
297
298
299
300
301 server {
302 if ($host = istex.gargantext.org) {
303 return 301 https://$host$request_uri;
304 } # managed by Certbot
305
306
307 server_name istex.gargantext.org;
308 listen 80;
309 return 404; # managed by Certbot
310
311 }
312
313
314
315
316 server {
317 if ($host = cillex.gargantext.org) {
318 return 301 https://$host$request_uri;
319 } # managed by Certbot
320
321
322
323
324 server_name cillex.gargantext.org;
325 listen 80;
326 return 404; # managed by Certbot
327
328
329 }