Nginx 配置

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
upstream www.google.com {
server 173.194.38.1:443;
server 173.194.38.2:443;
server 173.194.38.3:443;
server 173.194.38.4:443;
}

server{
listen 80;
server_name xxoo.lol www.xxoo.lol;
rewrite ^(.*) https://xxoo.lol/$1 permanent;
}

server{
listen 443;
server_name xxoo.lol;
ssl on;
ssl_certificate /usr/local/nginx/conf/vhost/ca/xxoo.lol.crt;
ssl_certificate_key /usr/local/nginx/conf/vhost/ca/xxoo.lol.key;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP;

location / {
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 X-Forwarded-Proto https;
proxy_pass https://www.google.com.hk;
}
}