Showing
1 changed file
with
10 additions
and
15 deletions
@@ -100,7 +100,7 @@ http | @@ -100,7 +100,7 @@ http | ||
100 | 100 | ||
101 | #proxy_temp_path /dev/shm/proxy_temp; | 101 | #proxy_temp_path /dev/shm/proxy_temp; |
102 | proxy_temp_path /Data/local/nginx-1.8.0/ngx_temp_dir; | 102 | proxy_temp_path /Data/local/nginx-1.8.0/ngx_temp_dir; |
103 | - proxy_cache_path /Data/local/nginx-1.8.0/ngx_cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=10g; | 103 | + proxy_cache_path /Data/local/nginx-1.8.0/ngx_cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=10g; |
104 | proxy_connect_timeout 5; | 104 | proxy_connect_timeout 5; |
105 | proxy_read_timeout 60; | 105 | proxy_read_timeout 60; |
106 | proxy_send_timeout 5; | 106 | proxy_send_timeout 5; |
@@ -112,10 +112,7 @@ http | @@ -112,10 +112,7 @@ http | ||
112 | fastcgi_temp_path /dev/shm/fastcgi_temp; | 112 | fastcgi_temp_path /dev/shm/fastcgi_temp; |
113 | client_body_temp_path /dev/shm/client_body_temp; | 113 | client_body_temp_path /dev/shm/client_body_temp; |
114 | 114 | ||
115 | - #upstream web | ||
116 | - upstream varnish { | ||
117 | - server 127.0.0.1:8081 weight=6 max_fails=2 fail_timeout=5s; | ||
118 | -} | 115 | + |
119 | 116 | ||
120 | #upstream | 117 | #upstream |
121 | fastcgi_next_upstream error timeout invalid_header http_500; | 118 | fastcgi_next_upstream error timeout invalid_header http_500; |
@@ -128,26 +125,25 @@ http | @@ -128,26 +125,25 @@ http | ||
128 | #fastcgi cache | 125 | #fastcgi cache |
129 | #fastcgi_cache_path /nginxcache levels=1:2 keys_zone=two:10m inactive=1d max_size=3000m; | 126 | #fastcgi_cache_path /nginxcache levels=1:2 keys_zone=two:10m inactive=1d max_size=3000m; |
130 | #for example just for study! have fun! | 127 | #for example just for study! have fun! |
131 | - | 128 | + |
132 | server { | 129 | server { |
133 | listen 80; | 130 | listen 80; |
134 | - server_name 203.88.173.209; | ||
135 | #access_log /Data/logs/nginx/access.log; | 131 | #access_log /Data/logs/nginx/access.log; |
136 | #location ~* ^/url/([^\/]+)/(.+)$ { | 132 | #location ~* ^/url/([^\/]+)/(.+)$ { |
137 | - location ~* ^/url/(.+)$ { | 133 | + location ~* ^/url/(.+)$ { |
138 | resolver 8.8.8.8; | 134 | resolver 8.8.8.8; |
139 | resolver_timeout 30s; | 135 | resolver_timeout 30s; |
140 | 136 | ||
141 | #proxy_pass $scheme://$1/$2?$query_string; | 137 | #proxy_pass $scheme://$1/$2?$query_string; |
142 | proxy_pass $scheme://$1?$query_string; | 138 | proxy_pass $scheme://$1?$query_string; |
143 | - } | 139 | + } |
144 | 140 | ||
145 | - location ~* ^/url/us.asos.com { | 141 | + location ~* ^/url/us.asos.com { |
146 | proxy_pass http://varnish; | 142 | proxy_pass http://varnish; |
147 | - } | ||
148 | -} | 143 | + } |
144 | + } | ||
149 | 145 | ||
150 | -server { | 146 | + server { |
151 | listen 8888; | 147 | listen 8888; |
152 | 148 | ||
153 | location / { | 149 | location / { |
@@ -158,6 +154,5 @@ server { | @@ -158,6 +154,5 @@ server { | ||
158 | proxy_set_header Host $http_host; | 154 | proxy_set_header Host $http_host; |
159 | } | 155 | } |
160 | 156 | ||
161 | -} | ||
162 | - | 157 | + } |
163 | } | 158 | } |
-
Please register or login to post a comment