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
server {
listen 80 ;

index index.html index.htm;
add_header Content-Type "text/html; charset=utf-8";
server_name applehater.cn;
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_buffers 16 8k;
gzip_min_length 1000;
gzip_proxied any;
gzip_disable "msie6";
gzip_http_version 1.0;
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
# 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://localhost:8087/;
# }
# 不区分大小写任意URL匹配,都访问到以下的文件
location ~.* {
alias /www/applehater.cn/public/index.html;
}
}