forked from lianglei2012/ngnix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
114 lines (99 loc) · 2.6 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream ghs {
ip_hash;
server ghs.google.com;
server 72.14.203.121;
server 72.14.207.121;
server 74.125.43.121;
server 74.125.47.121;
server 74.125.53.121;
server 74.125.77.121;
server 74.125.93.121;
server 74.125.95.121;
server 74.125.113.121;
server 216.239.32.21;
server 216.239.34.21;
server 216.239.36.21;
server 216.239.38.21;
}
server {
listen 173.230.146.161:80;
server_name www.killard.com post.killard.com;
access_log /var/log/nginx/killard.com.log main;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://ghs;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
}
}
server {
listen 173.230.146.161:443;
server_name www.killard.com post.killard.com;
access_log /var/log/nginx/killard.com.log main;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
error_page 497 "https://$host$uri";
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://ghs;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 173.230.146.161:8380;
server_name d.killard.com;
autoindex on;
access_log /var/log/nginx/killard.com.log main;
location / {
root /home/dkr/download/;
}
}
}
# mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
# }