-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginxvhost.conf
31 lines (28 loc) · 1.08 KB
/
nginxvhost.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
server {
listen 80 default_server;
#listen 443 ssl;
client_max_body_size 50M;
server_name www.zhaoyanchang.com zhaoyanchang.com;
location / {
proxy_pass http://127.0.0.1:88;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect http:// https://;
}
location /static { #这里做了访问静态目录不走uwsgi
expires 30d;
autoindex on;
add_header Cache-Control private;
alias /web/perblog/staticfiles; #
#alias /usr/share/nginx/django_pro01/static/;
}
location /img { #这里做了访问静态目录不走uwsgi
expires 30d;
autoindex on;
add_header Cache-Control private;
alias /web/perblog/img; #
#alias /usr/share/nginx/django_pro01/static/;
}
}