-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwww.csua.berkeley.edu
58 lines (55 loc) · 1.4 KB
/
www.csua.berkeley.edu
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
# Nginx config for CSUA
server {
listen 80;
server_name www.csua.berkeley.edu;
return 301 https://www.csua.berkeley.edu$request_uri;
access_log off;
}
server {
listen 443 ssl;
server_name www.csua.berkeley.edu;
error_page 404 /404.html;
access_log /var/log/nginx/csua_backend_access.log;
error_log /var/log/nginx/csua_backend_error.log;
location /computers/ping {
access_log off;
include proxy_params;
proxy_redirect off;
proxy_pass http://csua_backend;
}
location ~ ^/~(.+?)(/.*)?$ {
# Homedirs
alias /nfs/homes/$1/public_html$2;
autoindex off;
}
location /media/ {
alias /webserver/csua-backend/media_root/;
}
location /static/ {
alias /webserver/csua-backend/static_root/;
}
location = /favicon.ico {
root /webserver/csua-backend/static_root;
access_log off;
}
location = /pnunez.gif {
empty_gif;
access_log /var/log/nginx/pnunez_gif.log;
}
location = /robots.txt {
root /webserver/csua-backend/static_root;
access_log off;
}
location / {
include proxy_params;
proxy_redirect off;
proxy_pass http://csua_backend;
}
ssl_certificate /etc/letsencrypt/live/www.csua.berkeley.edu-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.csua.berkeley.edu-0001/privkey.pem; # managed by Certbot
add_header Strict-Transport-Security "max-age=20480" always;
client_max_body_size 100M;
}
upstream csua_backend {
server localhost:3001;
}