-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathnginx.conf
54 lines (47 loc) · 1.15 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
53
54
log_format blog.weizoo.com '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80;
server_name *.gitpress.org gitpress.org;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/blog;
location /
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8360/;
proxy_redirect off;
}
location /robots.txt
{
log_not_found off;
break;
}
location ~ /(baidu|google).*\.html$
{
break;
}
location ~ (favicon.ico)
{
log_not_found off;
expires 30d;
break;
}
location ~ /.*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
{
expires 30d;
}
location ~ /static/.*\.(woff)$
{
add_header Access-Control-Allow-Origin *;
}
location ~ /static/.*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/blog.weizoo.com.log blog.weizoo.com;
}