-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx.conf
52 lines (41 loc) · 1.18 KB
/
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
server {
listen 80;
server_name gsaffairs.bjtu.edu.cn;
access_log /var/log/nginx/gsaffairs.access.log;
client_max_body_size 100m;
root /home/gsmis/bjtu-papms/dist/;
index index.html index.htm;
error_page 403 /exception/403;
error_page 404 /exception/404;
# add_header X-Frame-Options SAMEORIGIN;
gzip on;
gzip_vary on;
# gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 2 8k;
# gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
location / {
try_files $uri $uri/ /index.html;
}
location /site_media {
root /home/gsmis/work/gsadmission/;
}
location /media {
root /home/gsmis/work/gsadmission/gsadmission/;
}
location ~* ^/api/* {
proxy_pass http://127.0.0.1:7001;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location ~ .*\.(html|htm)?$ {
expires 3m;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
}