forked from QxLabIreland/listening-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
golisten.nginx.conf
60 lines (51 loc) · 1.9 KB
/
golisten.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
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
server {
if ($host = golisten.ucd.ie) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80 ipv6only=on;
server_name golisten.ucd.ie;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name golisten.ucd.ie;
# SSL config
# ssl on;
# ssl_certificate "/etc/nginx/conf.d/1_golisten.ucd.ie_bundle.crt";
# ssl_certificate_key "/etc/nginx/conf.d/2_golisten.ucd.ie.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
# ssl_prefer_server_ciphers on;
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
# Gzip config
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 6;
gzip_types text/plain application/javascript application/x-javascript application/json application/octet-stream text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
client_max_body_size 200m;
# Client and api path config
location ^~ /api/ {
# rewrite ^.+api/?(.*)$ /$1 break;
include uwsgi_params;
proxy_pass http://localhost:8889;
}
location /static2/ {
include uwsgi_params;
proxy_pass http://localhost:8889;
}
location / {
root /home/golistenadmin/golisten/html;
index index.html;
try_files $uri $uri/ /index.html;
}
ssl_certificate /etc/letsencrypt/live/golisten.ucd.ie/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/golisten.ucd.ie/privkey.pem; # managed by Certbot
}