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
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.
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.
16 # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
19 # Default server configuration
22 #upstream backend_istex{
23 # server 127.0.0.1:8080;
27 #upstream backend_cillex{
28 # server 127.0.0.1:7080;
32 # worker_connections 2000;
38 server_name write.frame.gargantext.org;
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";
48 #proxy_set_header X-Real-IP $remote_addr;
49 # proxy_cookie_domain $host $host;
50 # proxy_ignore_headers Cache-Control Expires Set-Cookie;
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;
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
72 server_name write2.frame.gargantext.org;
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";
82 #proxy_set_header X-Real-IP $remote_addr;
83 # proxy_cookie_domain $host $host;
84 # proxy_ignore_headers Cache-Control Expires Set-Cookie;
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
102 server_name calc.frame.gargantext.org;
104 include proxy_params;
105 proxy_pass http://localhost:8000;
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
119 # server_name hackmd.gargantext.org;
121 # include proxy_params;
122 # proxy_pass http://localhost:8000;
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
136 server_name istex.frame.gargantext.org;
138 include proxy_params;
139 proxy_pass http://localhost:8080;
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
155 server_name istex.gargantext.org;
157 include proxy_params;
158 proxy_pass http://localhost:8080;
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
174 server_name searx.frame.gargantext.org;
176 include proxy_params;
177 proxy_pass http://localhost:8181;
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
193 # Virtual Host configuration for example.com
195 # You can move that to a different file under sites-available/ and symlink that
196 # to sites-enabled/ to enable it.
202 # server_name example.com;
204 # root /var/www/example.com;
208 # try_files $uri $uri/ =404;
215 if ($host = cillex.gargantext.org) {
216 return 301 https://$host$request_uri;
217 } # managed by Certbot
220 server_name cillex.gargantext.org;
221 return 404; # managed by Certbot
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
237 if ($host = searx.frame.gargantext.org) {
238 return 301 https://$host$request_uri;
239 } # managed by Certbot
242 server_name searx.frame.gargantext.org;
244 return 404; # managed by Certbot
250 if ($host = istex.frame.gargantext.org) {
251 return 301 https://$host$request_uri;
252 } # managed by Certbot
255 server_name istex.frame.gargantext.org;
257 return 404; # managed by Certbot
263 if ($host = calc.frame.gargantext.org) {
264 return 301 https://$host$request_uri;
265 } # managed by Certbot
268 server_name calc.frame.gargantext.org;
270 return 404; # managed by Certbot
275 if ($host = write.frame.gargantext.org) {
276 return 301 https://$host$request_uri;
277 } # managed by Certbot
280 server_name write.frame.gargantext.org;
282 return 404; # managed by Certbot
287 if ($host = write2.frame.gargantext.org) {
288 return 301 https://$host$request_uri;
289 } # managed by Certbot
292 server_name write2.frame.gargantext.org;
294 return 404; # managed by Certbot
302 if ($host = istex.gargantext.org) {
303 return 301 https://$host$request_uri;
304 } # managed by Certbot
307 server_name istex.gargantext.org;
309 return 404; # managed by Certbot
317 if ($host = cillex.gargantext.org) {
318 return 301 https://$host$request_uri;
319 } # managed by Certbot
324 server_name cillex.gargantext.org;
326 return 404; # managed by Certbot