script nginx和apache文件配置说明
Showing
9 changed files
with
3147 additions
and
1 deletions
script/server/apache/rls/httpd.conf
0 → 100644
1 | +# | ||
2 | +# This is the main Apache HTTP server configuration file. It contains the | ||
3 | +# configuration directives that give the server its instructions. | ||
4 | +# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | ||
5 | +# In particular, see | ||
6 | +# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | ||
7 | +# for a discussion of each configuration directive. | ||
8 | +# | ||
9 | +# Do NOT simply read the instructions in here without understanding | ||
10 | +# what they do. They're here only as hints or reminders. If you are unsure | ||
11 | +# consult the online docs. You have been warned. | ||
12 | +# | ||
13 | +# Configuration and logfile names: If the filenames you specify for many | ||
14 | +# of the server's control files begin with "/" (or "drive:/" for Win32), the | ||
15 | +# server will use that explicit path. If the filenames do *not* begin | ||
16 | +# with "/", the value of ServerRoot is prepended -- so "logs/access_log" | ||
17 | +# with ServerRoot set to "/usr/local/apache2" will be interpreted by the | ||
18 | +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" | ||
19 | +# will be interpreted as '/logs/access_log'. | ||
20 | + | ||
21 | +# | ||
22 | +# ServerRoot: The top of the directory tree under which the server's | ||
23 | +# configuration, error, and log files are kept. | ||
24 | +# | ||
25 | +# Do not add a slash at the end of the directory path. If you point | ||
26 | +# ServerRoot at a non-local disk, be sure to specify a local disk on the | ||
27 | +# Mutex directive, if file-based mutexes are used. If you wish to share the | ||
28 | +# same ServerRoot for multiple httpd daemons, you will need to change at | ||
29 | +# least PidFile. | ||
30 | +# | ||
31 | +ServerRoot "/Data/local/apache-2.4.12" | ||
32 | + | ||
33 | +# | ||
34 | +# Mutex: Allows you to set the mutex mechanism and mutex file directory | ||
35 | +# for individual mutexes, or change the global defaults | ||
36 | +# | ||
37 | +# Uncomment and change the directory if mutexes are file-based and the default | ||
38 | +# mutex file directory is not on a local disk or is not appropriate for some | ||
39 | +# other reason. | ||
40 | +# | ||
41 | +# Mutex default:logs | ||
42 | + | ||
43 | +# | ||
44 | +# Listen: Allows you to bind Apache to specific IP addresses and/or | ||
45 | +# ports, instead of the default. See also the <VirtualHost> | ||
46 | +# directive. | ||
47 | +# | ||
48 | +# Change this to Listen on specific IP addresses as shown below to | ||
49 | +# prevent Apache from glomming onto all bound IP addresses. | ||
50 | +# | ||
51 | +#Listen 12.34.56.78:80 | ||
52 | +Listen 172.31.21.139:8080 | ||
53 | +# | ||
54 | +# Dynamic Shared Object (DSO) Support | ||
55 | +# | ||
56 | +# To be able to use the functionality of a module which was built as a DSO you | ||
57 | +# have to place corresponding `LoadModule' lines at this location so the | ||
58 | +# directives contained in it are actually available _before_ they are used. | ||
59 | +# Statically compiled modules (those listed by `httpd -l') do not need | ||
60 | +# to be loaded here. | ||
61 | +# | ||
62 | +# Example: | ||
63 | +# LoadModule foo_module modules/mod_foo.so | ||
64 | +# | ||
65 | +LoadModule authn_file_module modules/mod_authn_file.so | ||
66 | +#LoadModule authn_dbm_module modules/mod_authn_dbm.so | ||
67 | +#LoadModule authn_anon_module modules/mod_authn_anon.so | ||
68 | +#LoadModule authn_dbd_module modules/mod_authn_dbd.so | ||
69 | +#LoadModule authn_socache_module modules/mod_authn_socache.so | ||
70 | +#LoadModule authn_core_module modules/mod_authn_core.so | ||
71 | +#LoadModule authz_host_module modules/mod_authz_host.so | ||
72 | +#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so | ||
73 | +#LoadModule authz_user_module modules/mod_authz_user.so | ||
74 | +#LoadModule authz_dbm_module modules/mod_authz_dbm.so | ||
75 | +#LoadModule authz_owner_module modules/mod_authz_owner.so | ||
76 | +#LoadModule authz_dbd_module modules/mod_authz_dbd.so | ||
77 | +LoadModule authz_core_module modules/mod_authz_core.so | ||
78 | +LoadModule access_compat_module modules/mod_access_compat.so | ||
79 | +#LoadModule auth_basic_module modules/mod_auth_basic.so | ||
80 | +#LoadModule auth_form_module modules/mod_auth_form.so | ||
81 | +#LoadModule auth_digest_module modules/mod_auth_digest.so | ||
82 | +#LoadModule allowmethods_module modules/mod_allowmethods.so | ||
83 | +#LoadModule file_cache_module modules/mod_file_cache.so | ||
84 | +#LoadModule cache_module modules/mod_cache.so | ||
85 | +#LoadModule cache_disk_module modules/mod_cache_disk.so | ||
86 | +#LoadModule cache_socache_module modules/mod_cache_socache.so | ||
87 | +#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so | ||
88 | +#LoadModule socache_dbm_module modules/mod_socache_dbm.so | ||
89 | +#LoadModule socache_memcache_module modules/mod_socache_memcache.so | ||
90 | +#LoadModule watchdog_module modules/mod_watchdog.so | ||
91 | +#LoadModule macro_module modules/mod_macro.so | ||
92 | +#LoadModule dbd_module modules/mod_dbd.so | ||
93 | +#LoadModule dumpio_module modules/mod_dumpio.so | ||
94 | +#LoadModule echo_module modules/mod_echo.so | ||
95 | +#LoadModule buffer_module modules/mod_buffer.so | ||
96 | +#LoadModule data_module modules/mod_data.so | ||
97 | +#LoadModule ratelimit_module modules/mod_ratelimit.so | ||
98 | +LoadModule reqtimeout_module modules/mod_reqtimeout.so | ||
99 | +#LoadModule ext_filter_module modules/mod_ext_filter.so | ||
100 | +#LoadModule request_module modules/mod_request.so | ||
101 | +#LoadModule include_module modules/mod_include.so | ||
102 | +#LoadModule filter_module modules/mod_filter.so | ||
103 | +#LoadModule reflector_module modules/mod_reflector.so | ||
104 | +#LoadModule substitute_module modules/mod_substitute.so | ||
105 | +#LoadModule sed_module modules/mod_sed.so | ||
106 | +#LoadModule charset_lite_module modules/mod_charset_lite.so | ||
107 | +#LoadModule deflate_module modules/mod_deflate.so | ||
108 | +#LoadModule xml2enc_module modules/mod_xml2enc.so | ||
109 | +#LoadModule proxy_html_module modules/mod_proxy_html.so | ||
110 | +LoadModule mime_module modules/mod_mime.so | ||
111 | +LoadModule log_config_module modules/mod_log_config.so | ||
112 | +#LoadModule log_debug_module modules/mod_log_debug.so | ||
113 | +#LoadModule log_forensic_module modules/mod_log_forensic.so | ||
114 | +#LoadModule logio_module modules/mod_logio.so | ||
115 | +#LoadModule env_module modules/mod_env.so | ||
116 | +#LoadModule mime_magic_module modules/mod_mime_magic.so | ||
117 | +#LoadModule expires_module modules/mod_expires.so | ||
118 | +LoadModule headers_module modules/mod_headers.so | ||
119 | +#LoadModule usertrack_module modules/mod_usertrack.so | ||
120 | +#LoadModule unique_id_module modules/mod_unique_id.so | ||
121 | +LoadModule setenvif_module modules/mod_setenvif.so | ||
122 | +LoadModule version_module modules/mod_version.so | ||
123 | +#LoadModule remoteip_module modules/mod_remoteip.so | ||
124 | +LoadModule proxy_module modules/mod_proxy.so | ||
125 | +#LoadModule proxy_connect_module modules/mod_proxy_connect.so | ||
126 | +#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so | ||
127 | +LoadModule proxy_http_module modules/mod_proxy_http.so | ||
128 | +#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so | ||
129 | +#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so | ||
130 | +#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so | ||
131 | +#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
132 | +#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so | ||
133 | +#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so | ||
134 | +#LoadModule proxy_express_module modules/mod_proxy_express.so | ||
135 | +#LoadModule session_module modules/mod_session.so | ||
136 | +#LoadModule session_cookie_module modules/mod_session_cookie.so | ||
137 | +#LoadModule session_dbd_module modules/mod_session_dbd.so | ||
138 | +LoadModule slotmem_shm_module modules/mod_slotmem_shm.so | ||
139 | +#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so | ||
140 | +#LoadModule ssl_module modules/mod_ssl.so | ||
141 | +#LoadModule dialup_module modules/mod_dialup.so | ||
142 | +#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so | ||
143 | +#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so | ||
144 | +#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so | ||
145 | +#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so | ||
146 | +LoadModule unixd_module modules/mod_unixd.so | ||
147 | +#LoadModule heartbeat_module modules/mod_heartbeat.so | ||
148 | +#LoadModule heartmonitor_module modules/mod_heartmonitor.so | ||
149 | +LoadModule status_module modules/mod_status.so | ||
150 | +LoadModule autoindex_module modules/mod_autoindex.so | ||
151 | +#LoadModule asis_module modules/mod_asis.so | ||
152 | +#LoadModule info_module modules/mod_info.so | ||
153 | +#LoadModule suexec_module modules/mod_suexec.so | ||
154 | +#LoadModule cgi_module modules/mod_cgi.so | ||
155 | +#LoadModule vhost_alias_module modules/mod_vhost_alias.so | ||
156 | +#LoadModule negotiation_module modules/mod_negotiation.so | ||
157 | +LoadModule dir_module modules/mod_dir.so | ||
158 | +#LoadModule actions_module modules/mod_actions.so | ||
159 | +#LoadModule speling_module modules/mod_speling.so | ||
160 | +LoadModule userdir_module modules/mod_userdir.so | ||
161 | +LoadModule alias_module modules/mod_alias.so | ||
162 | +LoadModule rewrite_module modules/mod_rewrite.so | ||
163 | +LoadModule php5_module modules/libphp5.so | ||
164 | +AddType application/x-httpd-php .php | ||
165 | + | ||
166 | +<IfModule unixd_module> | ||
167 | +# | ||
168 | +# If you wish httpd to run as a different user or group, you must run | ||
169 | +# httpd as root initially and it will switch. | ||
170 | +# | ||
171 | +# User/Group: The name (or #number) of the user/group to run httpd as. | ||
172 | +# It is usually good practice to create a dedicated user and group for | ||
173 | +# running httpd, as with most system services. | ||
174 | +# | ||
175 | +User www | ||
176 | +Group www | ||
177 | + | ||
178 | +</IfModule> | ||
179 | + | ||
180 | +# 'Main' server configuration | ||
181 | +# | ||
182 | +# The directives in this section set up the values used by the 'main' | ||
183 | +# server, which responds to any requests that aren't handled by a | ||
184 | +# <VirtualHost> definition. These values also provide defaults for | ||
185 | +# any <VirtualHost> containers you may define later in the file. | ||
186 | +# | ||
187 | +# All of these directives may appear inside <VirtualHost> containers, | ||
188 | +# in which case these default settings will be overridden for the | ||
189 | +# virtual host being defined. | ||
190 | +# | ||
191 | + | ||
192 | +# | ||
193 | +# ServerAdmin: Your address, where problems with the server should be | ||
194 | +# e-mailed. This address appears on some server-generated pages, such | ||
195 | +# as error documents. e.g. admin@your-domain.com | ||
196 | +# | ||
197 | +ServerAdmin you@example.com | ||
198 | + | ||
199 | +# | ||
200 | +# ServerName gives the name and port that the server uses to identify itself. | ||
201 | +# This can often be determined automatically, but we recommend you specify | ||
202 | +# it explicitly to prevent problems during startup. | ||
203 | +# | ||
204 | +# If your host doesn't have a registered DNS name, enter its IP address here. | ||
205 | +# | ||
206 | +ServerName localhost:8080 | ||
207 | + | ||
208 | +# | ||
209 | +# Deny access to the entirety of your server's filesystem. You must | ||
210 | +# explicitly permit access to web content directories in other | ||
211 | +# <Directory> blocks below. | ||
212 | +# | ||
213 | +<Directory /> | ||
214 | + AllowOverride none | ||
215 | + Require all denied | ||
216 | +</Directory> | ||
217 | +<Directory /Data> | ||
218 | + Options FollowSymLinks | ||
219 | + AllowOverride None | ||
220 | + Require all granted | ||
221 | +</Directory> | ||
222 | +#<Directory /Data/img/www.yoho.cn> | ||
223 | +# Options FollowSymLinks | ||
224 | +# AllowOverride None | ||
225 | +# Require all granted | ||
226 | +#</Directory> | ||
227 | + | ||
228 | +# | ||
229 | +# Note that from this point forward you must specifically allow | ||
230 | +# particular features to be enabled - so if something's not working as | ||
231 | +# you might expect, make sure that you have specifically enabled it | ||
232 | +# below. | ||
233 | +# | ||
234 | + | ||
235 | +# | ||
236 | +# DocumentRoot: The directory out of which you will serve your | ||
237 | +# documents. By default, all requests are taken from this directory, but | ||
238 | +# symbolic links and aliases may be used to point to other locations. | ||
239 | +# | ||
240 | +DocumentRoot "/Data/local/apache-2.4.12/htdocs" | ||
241 | +<Directory "/Data/local/apache-2.4.12/htdocs"> | ||
242 | + # | ||
243 | + # Possible values for the Options directive are "None", "All", | ||
244 | + # or any combination of: | ||
245 | + # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | ||
246 | + # | ||
247 | + # Note that "MultiViews" must be named *explicitly* --- "Options All" | ||
248 | + # doesn't give it to you. | ||
249 | + # | ||
250 | + # The Options directive is both complicated and important. Please see | ||
251 | + # http://httpd.apache.org/docs/2.4/mod/core.html#options | ||
252 | + # for more information. | ||
253 | + # | ||
254 | + Options Indexes FollowSymLinks | ||
255 | + | ||
256 | + # | ||
257 | + # AllowOverride controls what directives may be placed in .htaccess files. | ||
258 | + # It can be "All", "None", or any combination of the keywords: | ||
259 | + # AllowOverride FileInfo AuthConfig Limit | ||
260 | + # | ||
261 | + AllowOverride None | ||
262 | + | ||
263 | + # | ||
264 | + # Controls who can get stuff from this server. | ||
265 | + # | ||
266 | + Require all granted | ||
267 | +</Directory> | ||
268 | + | ||
269 | +# | ||
270 | +# DirectoryIndex: sets the file that Apache will serve if a directory | ||
271 | +# is requested. | ||
272 | +# | ||
273 | +<IfModule dir_module> | ||
274 | + DirectoryIndex index.html index.php | ||
275 | +</IfModule> | ||
276 | + | ||
277 | +# | ||
278 | +# The following lines prevent .htaccess and .htpasswd files from being | ||
279 | +# viewed by Web clients. | ||
280 | +# | ||
281 | +<Files ".ht*"> | ||
282 | + Require all denied | ||
283 | +</Files> | ||
284 | + | ||
285 | +# | ||
286 | +# ErrorLog: The location of the error log file. | ||
287 | +# If you do not specify an ErrorLog directive within a <VirtualHost> | ||
288 | +# container, error messages relating to that virtual host will be | ||
289 | +# logged here. If you *do* define an error logfile for a <VirtualHost> | ||
290 | +# container, that host's errors will be logged there and not here. | ||
291 | +# | ||
292 | +ErrorLog "/Data/logs/apache/error_log" | ||
293 | + | ||
294 | +# | ||
295 | +# LogLevel: Control the number of messages logged to the error_log. | ||
296 | +# Possible values include: debug, info, notice, warn, error, crit, | ||
297 | +# alert, emerg. | ||
298 | +# | ||
299 | +LogLevel warn | ||
300 | + | ||
301 | +<IfModule log_config_module> | ||
302 | + # | ||
303 | + # The following directives define some format nicknames for use with | ||
304 | + # a CustomLog directive (see below). | ||
305 | + # | ||
306 | + LogFormat "%{X-Real-Ip}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
307 | + LogFormat "%h %l %u %t \"%r\" %>s %b" common | ||
308 | + | ||
309 | + <IfModule logio_module> | ||
310 | + # You need to enable mod_logio.c to use %I and %O | ||
311 | + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio | ||
312 | + </IfModule> | ||
313 | + | ||
314 | + # | ||
315 | + # The location and format of the access logfile (Common Logfile Format). | ||
316 | + # If you do not define any access logfiles within a <VirtualHost> | ||
317 | + # container, they will be logged here. Contrariwise, if you *do* | ||
318 | + # define per-<VirtualHost> access logfiles, transactions will be | ||
319 | + # logged therein and *not* in this file. | ||
320 | + # | ||
321 | + CustomLog "/Data/logs/apache/access_log" common | ||
322 | + | ||
323 | + # | ||
324 | + # If you prefer a logfile with access, agent, and referer information | ||
325 | + # (Combined Logfile Format) you can use the following directive. | ||
326 | + # | ||
327 | + #CustomLog "logs/access_log" combined | ||
328 | +</IfModule> | ||
329 | + | ||
330 | +<IfModule alias_module> | ||
331 | + # | ||
332 | + # Redirect: Allows you to tell clients about documents that used to | ||
333 | + # exist in your server's namespace, but do not anymore. The client | ||
334 | + # will make a new request for the document at its new location. | ||
335 | + # Example: | ||
336 | + # Redirect permanent /foo http://www.example.com/bar | ||
337 | + | ||
338 | + # | ||
339 | + # Alias: Maps web paths into filesystem paths and is used to | ||
340 | + # access content that does not live under the DocumentRoot. | ||
341 | + # Example: | ||
342 | + # Alias /webpath /full/filesystem/path | ||
343 | + # | ||
344 | + # If you include a trailing / on /webpath then the server will | ||
345 | + # require it to be present in the URL. You will also likely | ||
346 | + # need to provide a <Directory> section to allow access to | ||
347 | + # the filesystem path. | ||
348 | + | ||
349 | + # | ||
350 | + # ScriptAlias: This controls which directories contain server scripts. | ||
351 | + # ScriptAliases are essentially the same as Aliases, except that | ||
352 | + # documents in the target directory are treated as applications and | ||
353 | + # run by the server when requested rather than as documents sent to the | ||
354 | + # client. The same rules about trailing "/" apply to ScriptAlias | ||
355 | + # directives as to Alias. | ||
356 | + # | ||
357 | + ScriptAlias /cgi-bin/ "/Data/local/apache-2.4.12/cgi-bin/" | ||
358 | + | ||
359 | +</IfModule> | ||
360 | + | ||
361 | +<IfModule cgid_module> | ||
362 | + # | ||
363 | + # ScriptSock: On threaded servers, designate the path to the UNIX | ||
364 | + # socket used to communicate with the CGI daemon of mod_cgid. | ||
365 | + # | ||
366 | + #Scriptsock cgisock | ||
367 | +</IfModule> | ||
368 | + | ||
369 | +# | ||
370 | +# "/Data/local/apache-2.4.12/cgi-bin" should be changed to whatever your ScriptAliased | ||
371 | +# CGI directory exists, if you have that configured. | ||
372 | +# | ||
373 | +<Directory "/Data/local/apache-2.4.12/cgi-bin"> | ||
374 | + AllowOverride None | ||
375 | + Options None | ||
376 | + Require all granted | ||
377 | +</Directory> | ||
378 | + | ||
379 | +<IfModule mime_module> | ||
380 | + # | ||
381 | + # TypesConfig points to the file containing the list of mappings from | ||
382 | + # filename extension to MIME-type. | ||
383 | + # | ||
384 | + TypesConfig conf/mime.types | ||
385 | + | ||
386 | + # | ||
387 | + # AddType allows you to add to or override the MIME configuration | ||
388 | + # file specified in TypesConfig for specific file types. | ||
389 | + # | ||
390 | + #AddType application/x-gzip .tgz | ||
391 | + # | ||
392 | + # AddEncoding allows you to have certain browsers uncompress | ||
393 | + # information on the fly. Note: Not all browsers support this. | ||
394 | + # | ||
395 | + #AddEncoding x-compress .Z | ||
396 | + #AddEncoding x-gzip .gz .tgz | ||
397 | + # | ||
398 | + # If the AddEncoding directives above are commented-out, then you | ||
399 | + # probably should define those extensions to indicate media types: | ||
400 | + # | ||
401 | + AddType application/x-compress .Z | ||
402 | + AddType application/x-gzip .gz .tgz | ||
403 | + | ||
404 | + # | ||
405 | + # AddHandler allows you to map certain file extensions to "handlers": | ||
406 | + # actions unrelated to filetype. These can be either built into the server | ||
407 | + # or added with the Action directive (see below) | ||
408 | + # | ||
409 | + # To use CGI scripts outside of ScriptAliased directories: | ||
410 | + # (You will also need to add "ExecCGI" to the "Options" directive.) | ||
411 | + # | ||
412 | + #AddHandler cgi-script .cgi | ||
413 | + | ||
414 | + # For type maps (negotiated resources): | ||
415 | + #AddHandler type-map var | ||
416 | + | ||
417 | + # | ||
418 | + # Filters allow you to process content before it is sent to the client. | ||
419 | + # | ||
420 | + # To parse .shtml files for server-side includes (SSI): | ||
421 | + # (You will also need to add "Includes" to the "Options" directive.) | ||
422 | + # | ||
423 | + #AddType text/html .shtml | ||
424 | + #AddOutputFilter INCLUDES .shtml | ||
425 | +</IfModule> | ||
426 | + | ||
427 | +# | ||
428 | +# The mod_mime_magic module allows the server to use various hints from the | ||
429 | +# contents of the file itself to determine its type. The MIMEMagicFile | ||
430 | +# directive tells the module where the hint definitions are located. | ||
431 | +# | ||
432 | +#MIMEMagicFile conf/magic | ||
433 | + | ||
434 | +# | ||
435 | +# Customizable error responses come in three flavors: | ||
436 | +# 1) plain text 2) local redirects 3) external redirects | ||
437 | +# | ||
438 | +# Some examples: | ||
439 | +#ErrorDocument 500 "The server made a boo boo." | ||
440 | +#ErrorDocument 404 /missing.html | ||
441 | +#ErrorDocument 404 "/cgi-bin/missing_handler.pl" | ||
442 | +#ErrorDocument 402 http://www.example.com/subscription_info.html | ||
443 | +# | ||
444 | + | ||
445 | +# | ||
446 | +# MaxRanges: Maximum number of Ranges in a request before | ||
447 | +# returning the entire resource, or one of the special | ||
448 | +# values 'default', 'none' or 'unlimited'. | ||
449 | +# Default setting is to accept 200 Ranges. | ||
450 | +#MaxRanges unlimited | ||
451 | + | ||
452 | +# | ||
453 | +# EnableMMAP and EnableSendfile: On systems that support it, | ||
454 | +# memory-mapping or the sendfile syscall may be used to deliver | ||
455 | +# files. This usually improves server performance, but must | ||
456 | +# be turned off when serving from networked-mounted | ||
457 | +# filesystems or if support for these functions is otherwise | ||
458 | +# broken on your system. | ||
459 | +# Defaults: EnableMMAP On, EnableSendfile Off | ||
460 | +# | ||
461 | +#EnableMMAP off | ||
462 | +#EnableSendfile on | ||
463 | + | ||
464 | +# Supplemental configuration | ||
465 | +# | ||
466 | +# The configuration files in the conf/extra/ directory can be | ||
467 | +# included to add extra features or to modify the default configuration of | ||
468 | +# the server, or you may simply copy their contents here and change as | ||
469 | +# necessary. | ||
470 | + | ||
471 | +# Server-pool management (MPM specific) | ||
472 | +Include conf/extra/httpd-mpm.conf | ||
473 | + | ||
474 | +# Multi-language error messages | ||
475 | +#Include conf/extra/httpd-multilang-errordoc.conf | ||
476 | + | ||
477 | +# Fancy directory listings | ||
478 | +#Include conf/extra/httpd-autoindex.conf | ||
479 | + | ||
480 | +# Language settings | ||
481 | +#Include conf/extra/httpd-languages.conf | ||
482 | + | ||
483 | +# User home directories | ||
484 | +#Include conf/extra/httpd-userdir.conf | ||
485 | + | ||
486 | +# Real-time info on requests and configuration | ||
487 | +#Include conf/extra/httpd-info.conf | ||
488 | + | ||
489 | +# Virtual hosts | ||
490 | +Include conf/extra/yohobuy.conf | ||
491 | +Include conf/extra/yohobuy_pc.conf | ||
492 | + | ||
493 | +# Local access to the Apache HTTP Server Manual | ||
494 | +#Include conf/extra/httpd-manual.conf | ||
495 | + | ||
496 | +# Distributed authoring and versioning (WebDAV) | ||
497 | +#Include conf/extra/httpd-dav.conf | ||
498 | + | ||
499 | +# Various default settings | ||
500 | +Include conf/extra/httpd-default.conf | ||
501 | + | ||
502 | +# Configure mod_proxy_html to understand HTML4/XHTML1 | ||
503 | +<IfModule proxy_html_module> | ||
504 | +Include conf/extra/proxy-html.conf | ||
505 | +</IfModule> | ||
506 | + | ||
507 | +# Secure (SSL/TLS) connections | ||
508 | +#Include conf/extra/httpd-ssl.conf | ||
509 | +# | ||
510 | +# Note: The following must must be present to support | ||
511 | +# starting without SSL on platforms with no /dev/random equivalent | ||
512 | +# but a statically compiled-in mod_ssl. | ||
513 | +# | ||
514 | +<IfModule ssl_module> | ||
515 | +SSLRandomSeed startup builtin | ||
516 | +SSLRandomSeed connect builtin | ||
517 | +</IfModule> | ||
518 | +# | ||
519 | +# uncomment out the below to deal with user agents that deliberately | ||
520 | +# violate open standards by misusing DNT (DNT *must* be a specific | ||
521 | +# end-user choice) | ||
522 | +# | ||
523 | +#<IfModule setenvif_module> | ||
524 | +#BrowserMatch "MSIE 10.0;" bad_DNT | ||
525 | +#</IfModule> | ||
526 | +#<IfModule headers_module> | ||
527 | +#RequestHeader unset DNT env=bad_DNT | ||
528 | +#</IfModule> | ||
529 | + |
script/server/apache/rls/yohobuy_pc.conf
0 → 100644
1 | +<VirtualHost *:8080> | ||
2 | + ServerAdmin root@localhost | ||
3 | + CustomLog "/Data/logs/apache/yohobuy_access.log" combined | ||
4 | + ErrorLog "/Data/logs/apache/error.huodong.yohobuy.com.log" | ||
5 | + ServerName huodong.yohobuy.com | ||
6 | + DocumentRoot "/Data/PE/yohobuy_pc/yohobuy/huodong.yohobuy.com/public" | ||
7 | + RewriteEngine on | ||
8 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
9 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
10 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
11 | + RewriteRule ^/(.+)$ /index.php [L] | ||
12 | + <Directory /> | ||
13 | + LimitRequestBody 10485760 | ||
14 | + Options FollowSymLinks | ||
15 | + AllowOverride None | ||
16 | + Order allow,deny | ||
17 | + Allow from all | ||
18 | + Require all granted | ||
19 | + </Directory> | ||
20 | +</VirtualHost> | ||
21 | + | ||
22 | +<VirtualHost *:8080> | ||
23 | + ServerAdmin root@localhost | ||
24 | + CustomLog "/Data/logs/apache/yohobuy_access.log" combined | ||
25 | + ErrorLog "/Data/logs/apache/yohobuy_error.log" | ||
26 | + ServerName www.yohobuy.com | ||
27 | + ServerAlias *.yohobuy.com | ||
28 | + DocumentRoot "/Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public/" | ||
29 | + RewriteEngine on | ||
30 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
31 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
32 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
33 | + RewriteRule /home /index.php [L] | ||
34 | + RewriteRule ^/(.+)$ /index.php [L] | ||
35 | + <Directory /> | ||
36 | + LimitRequestBody 10485760 | ||
37 | + Options FollowSymLinks | ||
38 | + AllowOverride None | ||
39 | + Order allow,deny | ||
40 | + Allow from all | ||
41 | + Require all granted | ||
42 | + </Directory> | ||
43 | +</VirtualHost> |
script/server/apache/test/httpd.conf
0 → 100644
1 | +# | ||
2 | +# This is the main Apache HTTP server configuration file. It contains the | ||
3 | +# configuration directives that give the server its instructions. | ||
4 | +# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | ||
5 | +# In particular, see | ||
6 | +# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | ||
7 | +# for a discussion of each configuration directive. | ||
8 | +# | ||
9 | +# Do NOT simply read the instructions in here without understanding | ||
10 | +# what they do. They're here only as hints or reminders. If you are unsure | ||
11 | +# consult the online docs. You have been warned. | ||
12 | +# | ||
13 | +# Configuration and logfile names: If the filenames you specify for many | ||
14 | +# of the server's control files begin with "/" (or "drive:/" for Win32), the | ||
15 | +# server will use that explicit path. If the filenames do *not* begin | ||
16 | +# with "/", the value of ServerRoot is prepended -- so "logs/access_log" | ||
17 | +# with ServerRoot set to "/usr/local/apache2" will be interpreted by the | ||
18 | +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" | ||
19 | +# will be interpreted as '/logs/access_log'. | ||
20 | + | ||
21 | +# | ||
22 | +# ServerRoot: The top of the directory tree under which the server's | ||
23 | +# configuration, error, and log files are kept. | ||
24 | +# | ||
25 | +# Do not add a slash at the end of the directory path. If you point | ||
26 | +# ServerRoot at a non-local disk, be sure to specify a local disk on the | ||
27 | +# Mutex directive, if file-based mutexes are used. If you wish to share the | ||
28 | +# same ServerRoot for multiple httpd daemons, you will need to change at | ||
29 | +# least PidFile. | ||
30 | +# | ||
31 | +ServerRoot "/Data/local/apache-2.4.12" | ||
32 | + | ||
33 | +# | ||
34 | +# Mutex: Allows you to set the mutex mechanism and mutex file directory | ||
35 | +# for individual mutexes, or change the global defaults | ||
36 | +# | ||
37 | +# Uncomment and change the directory if mutexes are file-based and the default | ||
38 | +# mutex file directory is not on a local disk or is not appropriate for some | ||
39 | +# other reason. | ||
40 | +# | ||
41 | +# Mutex default:logs | ||
42 | + | ||
43 | +# | ||
44 | +# Listen: Allows you to bind Apache to specific IP addresses and/or | ||
45 | +# ports, instead of the default. See also the <VirtualHost> | ||
46 | +# directive. | ||
47 | +# | ||
48 | +# Change this to Listen on specific IP addresses as shown below to | ||
49 | +# prevent Apache from glomming onto all bound IP addresses. | ||
50 | +# | ||
51 | +#Listen 12.34.56.78:80 | ||
52 | +Listen 6060 | ||
53 | +# | ||
54 | +# Dynamic Shared Object (DSO) Support | ||
55 | +# | ||
56 | +# To be able to use the functionality of a module which was built as a DSO you | ||
57 | +# have to place corresponding `LoadModule' lines at this location so the | ||
58 | +# directives contained in it are actually available _before_ they are used. | ||
59 | +# Statically compiled modules (those listed by `httpd -l') do not need | ||
60 | +# to be loaded here. | ||
61 | +# | ||
62 | +# Example: | ||
63 | +# LoadModule foo_module modules/mod_foo.so | ||
64 | +# | ||
65 | +LoadModule authn_file_module modules/mod_authn_file.so | ||
66 | +#LoadModule authn_dbm_module modules/mod_authn_dbm.so | ||
67 | +#LoadModule authn_anon_module modules/mod_authn_anon.so | ||
68 | +#LoadModule authn_dbd_module modules/mod_authn_dbd.so | ||
69 | +#LoadModule authn_socache_module modules/mod_authn_socache.so | ||
70 | +#LoadModule authn_core_module modules/mod_authn_core.so | ||
71 | +#LoadModule authz_host_module modules/mod_authz_host.so | ||
72 | +#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so | ||
73 | +#LoadModule authz_user_module modules/mod_authz_user.so | ||
74 | +#LoadModule authz_dbm_module modules/mod_authz_dbm.so | ||
75 | +#LoadModule authz_owner_module modules/mod_authz_owner.so | ||
76 | +#LoadModule authz_dbd_module modules/mod_authz_dbd.so | ||
77 | +LoadModule authz_core_module modules/mod_authz_core.so | ||
78 | +LoadModule access_compat_module modules/mod_access_compat.so | ||
79 | +#LoadModule auth_basic_module modules/mod_auth_basic.so | ||
80 | +#LoadModule auth_form_module modules/mod_auth_form.so | ||
81 | +#LoadModule auth_digest_module modules/mod_auth_digest.so | ||
82 | +#LoadModule allowmethods_module modules/mod_allowmethods.so | ||
83 | +#LoadModule file_cache_module modules/mod_file_cache.so | ||
84 | +#LoadModule cache_module modules/mod_cache.so | ||
85 | +#LoadModule cache_disk_module modules/mod_cache_disk.so | ||
86 | +#LoadModule cache_socache_module modules/mod_cache_socache.so | ||
87 | +#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so | ||
88 | +#LoadModule socache_dbm_module modules/mod_socache_dbm.so | ||
89 | +#LoadModule socache_memcache_module modules/mod_socache_memcache.so | ||
90 | +#LoadModule watchdog_module modules/mod_watchdog.so | ||
91 | +#LoadModule macro_module modules/mod_macro.so | ||
92 | +#LoadModule dbd_module modules/mod_dbd.so | ||
93 | +#LoadModule dumpio_module modules/mod_dumpio.so | ||
94 | +#LoadModule echo_module modules/mod_echo.so | ||
95 | +#LoadModule buffer_module modules/mod_buffer.so | ||
96 | +#LoadModule data_module modules/mod_data.so | ||
97 | +#LoadModule ratelimit_module modules/mod_ratelimit.so | ||
98 | +LoadModule reqtimeout_module modules/mod_reqtimeout.so | ||
99 | +#LoadModule ext_filter_module modules/mod_ext_filter.so | ||
100 | +#LoadModule request_module modules/mod_request.so | ||
101 | +#LoadModule include_module modules/mod_include.so | ||
102 | +#LoadModule filter_module modules/mod_filter.so | ||
103 | +#LoadModule reflector_module modules/mod_reflector.so | ||
104 | +#LoadModule substitute_module modules/mod_substitute.so | ||
105 | +#LoadModule sed_module modules/mod_sed.so | ||
106 | +#LoadModule charset_lite_module modules/mod_charset_lite.so | ||
107 | +#LoadModule deflate_module modules/mod_deflate.so | ||
108 | +#LoadModule xml2enc_module modules/mod_xml2enc.so | ||
109 | +#LoadModule proxy_html_module modules/mod_proxy_html.so | ||
110 | +LoadModule mime_module modules/mod_mime.so | ||
111 | +LoadModule log_config_module modules/mod_log_config.so | ||
112 | +#LoadModule log_debug_module modules/mod_log_debug.so | ||
113 | +#LoadModule log_forensic_module modules/mod_log_forensic.so | ||
114 | +#LoadModule logio_module modules/mod_logio.so | ||
115 | +#LoadModule env_module modules/mod_env.so | ||
116 | +#LoadModule mime_magic_module modules/mod_mime_magic.so | ||
117 | +#LoadModule expires_module modules/mod_expires.so | ||
118 | +LoadModule headers_module modules/mod_headers.so | ||
119 | +#LoadModule usertrack_module modules/mod_usertrack.so | ||
120 | +#LoadModule unique_id_module modules/mod_unique_id.so | ||
121 | +LoadModule setenvif_module modules/mod_setenvif.so | ||
122 | +LoadModule version_module modules/mod_version.so | ||
123 | +#LoadModule remoteip_module modules/mod_remoteip.so | ||
124 | +LoadModule proxy_module modules/mod_proxy.so | ||
125 | +#LoadModule proxy_connect_module modules/mod_proxy_connect.so | ||
126 | +#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so | ||
127 | +LoadModule proxy_http_module modules/mod_proxy_http.so | ||
128 | +#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so | ||
129 | +#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so | ||
130 | +#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so | ||
131 | +#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so | ||
132 | +#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so | ||
133 | +#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so | ||
134 | +#LoadModule proxy_express_module modules/mod_proxy_express.so | ||
135 | +#LoadModule session_module modules/mod_session.so | ||
136 | +#LoadModule session_cookie_module modules/mod_session_cookie.so | ||
137 | +#LoadModule session_dbd_module modules/mod_session_dbd.so | ||
138 | +LoadModule slotmem_shm_module modules/mod_slotmem_shm.so | ||
139 | +#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so | ||
140 | +#LoadModule ssl_module modules/mod_ssl.so | ||
141 | +#LoadModule dialup_module modules/mod_dialup.so | ||
142 | +#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so | ||
143 | +#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so | ||
144 | +#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so | ||
145 | +#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so | ||
146 | +LoadModule unixd_module modules/mod_unixd.so | ||
147 | +#LoadModule heartbeat_module modules/mod_heartbeat.so | ||
148 | +#LoadModule heartmonitor_module modules/mod_heartmonitor.so | ||
149 | +LoadModule status_module modules/mod_status.so | ||
150 | +LoadModule autoindex_module modules/mod_autoindex.so | ||
151 | +#LoadModule asis_module modules/mod_asis.so | ||
152 | +#LoadModule info_module modules/mod_info.so | ||
153 | +#LoadModule suexec_module modules/mod_suexec.so | ||
154 | +#LoadModule cgi_module modules/mod_cgi.so | ||
155 | +#LoadModule vhost_alias_module modules/mod_vhost_alias.so | ||
156 | +#LoadModule negotiation_module modules/mod_negotiation.so | ||
157 | +LoadModule dir_module modules/mod_dir.so | ||
158 | +#LoadModule actions_module modules/mod_actions.so | ||
159 | +#LoadModule speling_module modules/mod_speling.so | ||
160 | +LoadModule userdir_module modules/mod_userdir.so | ||
161 | +LoadModule alias_module modules/mod_alias.so | ||
162 | +LoadModule rewrite_module modules/mod_rewrite.so | ||
163 | +LoadModule php5_module modules/libphp5.so | ||
164 | +AddType application/x-httpd-php .php | ||
165 | + | ||
166 | +<IfModule unixd_module> | ||
167 | +# | ||
168 | +# If you wish httpd to run as a different user or group, you must run | ||
169 | +# httpd as root initially and it will switch. | ||
170 | +# | ||
171 | +# User/Group: The name (or #number) of the user/group to run httpd as. | ||
172 | +# It is usually good practice to create a dedicated user and group for | ||
173 | +# running httpd, as with most system services. | ||
174 | +# | ||
175 | +User www | ||
176 | +Group www | ||
177 | + | ||
178 | +</IfModule> | ||
179 | + | ||
180 | +# 'Main' server configuration | ||
181 | +# | ||
182 | +# The directives in this section set up the values used by the 'main' | ||
183 | +# server, which responds to any requests that aren't handled by a | ||
184 | +# <VirtualHost> definition. These values also provide defaults for | ||
185 | +# any <VirtualHost> containers you may define later in the file. | ||
186 | +# | ||
187 | +# All of these directives may appear inside <VirtualHost> containers, | ||
188 | +# in which case these default settings will be overridden for the | ||
189 | +# virtual host being defined. | ||
190 | +# | ||
191 | + | ||
192 | +# | ||
193 | +# ServerAdmin: Your address, where problems with the server should be | ||
194 | +# e-mailed. This address appears on some server-generated pages, such | ||
195 | +# as error documents. e.g. admin@your-domain.com | ||
196 | +# | ||
197 | +ServerAdmin you@example.com | ||
198 | + | ||
199 | +# | ||
200 | +# ServerName gives the name and port that the server uses to identify itself. | ||
201 | +# This can often be determined automatically, but we recommend you specify | ||
202 | +# it explicitly to prevent problems during startup. | ||
203 | +# | ||
204 | +# If your host doesn't have a registered DNS name, enter its IP address here. | ||
205 | +# | ||
206 | +ServerName localhost:6060 | ||
207 | + | ||
208 | +# | ||
209 | +# Deny access to the entirety of your server's filesystem. You must | ||
210 | +# explicitly permit access to web content directories in other | ||
211 | +# <Directory> blocks below. | ||
212 | +# | ||
213 | +<Directory /> | ||
214 | + AllowOverride none | ||
215 | + Require all denied | ||
216 | +</Directory> | ||
217 | + | ||
218 | +# | ||
219 | +# Note that from this point forward you must specifically allow | ||
220 | +# particular features to be enabled - so if something's not working as | ||
221 | +# you might expect, make sure that you have specifically enabled it | ||
222 | +# below. | ||
223 | +# | ||
224 | + | ||
225 | +# | ||
226 | +# DocumentRoot: The directory out of which you will serve your | ||
227 | +# documents. By default, all requests are taken from this directory, but | ||
228 | +#/ symbolic links and aliases may be used to point to other locations. | ||
229 | +# | ||
230 | +DocumentRoot "/Data/local/apache-2.4.12/htdocs" | ||
231 | +<Directory "/Data/local/apache-2.4.12/htdocs"> | ||
232 | + # | ||
233 | + # Possible values for the Options directive are "None", "All", | ||
234 | + # or any combination of: | ||
235 | + # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | ||
236 | + # | ||
237 | + # Note that "MultiViews" must be named *explicitly* --- "Options All" | ||
238 | + # doesn't give it to you. | ||
239 | + # | ||
240 | + # The Options directive is both complicated and important. Please see | ||
241 | + # http://httpd.apache.org/docs/2.4/mod/core.html#options | ||
242 | + # for more information. | ||
243 | + # | ||
244 | + Options Indexes FollowSymLinks | ||
245 | + | ||
246 | + # | ||
247 | + # AllowOverride controls what directives may be placed in .htaccess files. | ||
248 | + # It can be "All", "None", or any combination of the keywords: | ||
249 | + # AllowOverride FileInfo AuthConfig Limit | ||
250 | + # | ||
251 | + AllowOverride None | ||
252 | + | ||
253 | + # | ||
254 | + # Controls who can get stuff from this server. | ||
255 | + # | ||
256 | + Require all granted | ||
257 | +</Directory> | ||
258 | + | ||
259 | +# | ||
260 | +# DirectoryIndex: sets the file that Apache will serve if a directory | ||
261 | +# is requested. | ||
262 | +# | ||
263 | +<IfModule dir_module> | ||
264 | + DirectoryIndex index.html index.php | ||
265 | +</IfModule> | ||
266 | + | ||
267 | +# | ||
268 | +# The following lines prevent .htaccess and .htpasswd files from being | ||
269 | +# viewed by Web clients. | ||
270 | +# | ||
271 | +<Files ".ht*"> | ||
272 | + Require all denied | ||
273 | +</Files> | ||
274 | + | ||
275 | +# | ||
276 | +# ErrorLog: The location of the error log file. | ||
277 | +# If you do not specify an ErrorLog directive within a <VirtualHost> | ||
278 | +# container, error messages relating to that virtual host will be | ||
279 | +# logged here. If you *do* define an error logfile for a <VirtualHost> | ||
280 | +# container, that host's errors will be logged there and not here. | ||
281 | +# | ||
282 | +ErrorLog "/Data/logs/apache/error_log" | ||
283 | + | ||
284 | +# | ||
285 | +# LogLevel: Control the number of messages logged to the error_log. | ||
286 | +# Possible values include: debug, info, notice, warn, error, crit, | ||
287 | +# alert, emerg. | ||
288 | +# | ||
289 | +LogLevel warn | ||
290 | + | ||
291 | +<IfModule log_config_module> | ||
292 | + # | ||
293 | + # The following directives define some format nicknames for use with | ||
294 | + # a CustomLog directive (see below). | ||
295 | + # | ||
296 | + LogFormat "%{X-Real-Ip}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
297 | + LogFormat "%h %l %u %t \"%r\" %>s %b" common | ||
298 | + | ||
299 | + <IfModule logio_module> | ||
300 | + # You need to enable mod_logio.c to use %I and %O | ||
301 | + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio | ||
302 | + </IfModule> | ||
303 | + | ||
304 | + # | ||
305 | + # The location and format of the access logfile (Common Logfile Format). | ||
306 | + # If you do not define any access logfiles within a <VirtualHost> | ||
307 | + # container, they will be logged here. Contrariwise, if you *do* | ||
308 | + # define per-<VirtualHost> access logfiles, transactions will be | ||
309 | + # logged therein and *not* in this file. | ||
310 | + # | ||
311 | + CustomLog "/Data/logs/apache/access_log" common | ||
312 | + | ||
313 | + # | ||
314 | + # If you prefer a logfile with access, agent, and referer information | ||
315 | + # (Combined Logfile Format) you can use the following directive. | ||
316 | + # | ||
317 | + #CustomLog "logs/access_log" combined | ||
318 | +</IfModule> | ||
319 | + | ||
320 | +<IfModule alias_module> | ||
321 | + # | ||
322 | + # Redirect: Allows you to tell clients about documents that used to | ||
323 | + # exist in your server's namespace, but do not anymore. The client | ||
324 | + # will make a new request for the document at its new location. | ||
325 | + # Example: | ||
326 | + # Redirect permanent /foo http://www.example.com/bar | ||
327 | + | ||
328 | + # | ||
329 | + # Alias: Maps web paths into filesystem paths and is used to | ||
330 | + # access content that does not live under the DocumentRoot. | ||
331 | + # Example: | ||
332 | + # Alias /webpath /full/filesystem/path | ||
333 | + # | ||
334 | + # If you include a trailing / on /webpath then the server will | ||
335 | + # require it to be present in the URL. You will also likely | ||
336 | + # need to provide a <Directory> section to allow access to | ||
337 | + # the filesystem path. | ||
338 | + | ||
339 | + # | ||
340 | + # ScriptAlias: This controls which directories contain server scripts. | ||
341 | + # ScriptAliases are essentially the same as Aliases, except that | ||
342 | + # documents in the target directory are treated as applications and | ||
343 | + # run by the server when requested rather than as documents sent to the | ||
344 | + # client. The same rules about trailing "/" apply to ScriptAlias | ||
345 | + # directives as to Alias. | ||
346 | + # | ||
347 | + ScriptAlias /cgi-bin/ "/Data/local/apache-2.4.12/cgi-bin/" | ||
348 | + | ||
349 | +</IfModule> | ||
350 | + | ||
351 | +<IfModule cgid_module> | ||
352 | + # | ||
353 | + # ScriptSock: On threaded servers, designate the path to the UNIX | ||
354 | + # socket used to communicate with the CGI daemon of mod_cgid. | ||
355 | + # | ||
356 | + #Scriptsock cgisock | ||
357 | +</IfModule> | ||
358 | + | ||
359 | +# | ||
360 | +# "/Data/local/apache-2.4.12/cgi-bin" should be changed to whatever your ScriptAliased | ||
361 | +# CGI directory exists, if you have that configured. | ||
362 | +# | ||
363 | +<Directory "/Data/local/apache-2.4.12/cgi-bin"> | ||
364 | + AllowOverride None | ||
365 | + Options None | ||
366 | + Require all granted | ||
367 | +</Directory> | ||
368 | + | ||
369 | +<IfModule mime_module> | ||
370 | + # | ||
371 | + # TypesConfig points to the file containing the list of mappings from | ||
372 | + # filename extension to MIME-type. | ||
373 | + # | ||
374 | + TypesConfig conf/mime.types | ||
375 | + | ||
376 | + # | ||
377 | + # AddType allows you to add to or override the MIME configuration | ||
378 | + # file specified in TypesConfig for specific file types. | ||
379 | + # | ||
380 | + #AddType application/x-gzip .tgz | ||
381 | + # | ||
382 | + # AddEncoding allows you to have certain browsers uncompress | ||
383 | + # information on the fly. Note: Not all browsers support this. | ||
384 | + # | ||
385 | + #AddEncoding x-compress .Z | ||
386 | + #AddEncoding x-gzip .gz .tgz | ||
387 | + # | ||
388 | + # If the AddEncoding directives above are commented-out, then you | ||
389 | + # probably should define those extensions to indicate media types: | ||
390 | + # | ||
391 | + AddType application/x-compress .Z | ||
392 | + AddType application/x-gzip .gz .tgz | ||
393 | + | ||
394 | + # | ||
395 | + # AddHandler allows you to map certain file extensions to "handlers": | ||
396 | + # actions unrelated to filetype. These can be either built into the server | ||
397 | + # or added with the Action directive (see below) | ||
398 | + # | ||
399 | + # To use CGI scripts outside of ScriptAliased directories: | ||
400 | + # (You will also need to add "ExecCGI" to the "Options" directive.) | ||
401 | + # | ||
402 | + #AddHandler cgi-script .cgi | ||
403 | + | ||
404 | + # For type maps (negotiated resources): | ||
405 | + #AddHandler type-map var | ||
406 | + | ||
407 | + # | ||
408 | + # Filters allow you to process content before it is sent to the client. | ||
409 | + # | ||
410 | + # To parse .shtml files for server-side includes (SSI): | ||
411 | + # (You will also need to add "Includes" to the "Options" directive.) | ||
412 | + # | ||
413 | + #AddType text/html .shtml | ||
414 | + #AddOutputFilter INCLUDES .shtml | ||
415 | +</IfModule> | ||
416 | + | ||
417 | +# | ||
418 | +# The mod_mime_magic module allows the server to use various hints from the | ||
419 | +# contents of the file itself to determine its type. The MIMEMagicFile | ||
420 | +# directive tells the module where the hint definitions are located. | ||
421 | +# | ||
422 | +#MIMEMagicFile conf/magic | ||
423 | + | ||
424 | +# | ||
425 | +# Customizable error responses come in three flavors: | ||
426 | +# 1) plain text 2) local redirects 3) external redirects | ||
427 | +# | ||
428 | +# Some examples: | ||
429 | +#ErrorDocument 500 "The server made a boo boo." | ||
430 | +#ErrorDocument 404 /missing.html | ||
431 | +#ErrorDocument 404 "/cgi-bin/missing_handler.pl" | ||
432 | +#ErrorDocument 402 http://www.example.com/subscription_info.html | ||
433 | +# | ||
434 | + | ||
435 | +# | ||
436 | +# MaxRanges: Maximum number of Ranges in a request before | ||
437 | +# returning the entire resource, or one of the special | ||
438 | +# values 'default', 'none' or 'unlimited'. | ||
439 | +# Default setting is to accept 200 Ranges. | ||
440 | +#MaxRanges unlimited | ||
441 | + | ||
442 | +# | ||
443 | +# EnableMMAP and EnableSendfile: On systems that support it, | ||
444 | +# memory-mapping or the sendfile syscall may be used to deliver | ||
445 | +# files. This usually improves server performance, but must | ||
446 | +# be turned off when serving from networked-mounted | ||
447 | +# filesystems or if support for these functions is otherwise | ||
448 | +# broken on your system. | ||
449 | +# Defaults: EnableMMAP On, EnableSendfile Off | ||
450 | +# | ||
451 | +#EnableMMAP off | ||
452 | +#EnableSendfile on | ||
453 | + | ||
454 | +# Supplemental configuration | ||
455 | +# | ||
456 | +# The configuration files in the conf/extra/ directory can be | ||
457 | +# included to add extra features or to modify the default configuration of | ||
458 | +# the server, or you may simply copy their contents here and change as | ||
459 | +# necessary. | ||
460 | + | ||
461 | +# Fancy directory listings | ||
462 | +#Include conf/extra/httpd-autoindex.conf | ||
463 | + | ||
464 | +# Language settings | ||
465 | +#Include conf/extra/httpd-languages.conf | ||
466 | + | ||
467 | +# Real-time info on requests and configuration | ||
468 | +#Include conf/extra/httpd-info.conf | ||
469 | + | ||
470 | +# Virtual hosts | ||
471 | +Include conf/extra/test.yohobuy.conf | ||
472 | + | ||
473 | +# Local access to the Apache HTTP Server Manual | ||
474 | +#Include conf/extra/httpd-manual.conf | ||
475 | + | ||
476 | +# Distributed authoring and versioning (WebDAV) | ||
477 | +#Include conf/extra/httpd-dav.conf | ||
478 | + | ||
479 | +# Various default settings | ||
480 | +Include conf/extra/httpd-default.conf | ||
481 | + | ||
482 | +# Configure mod_proxy_html to understand HTML4/XHTML1 | ||
483 | +<IfModule proxy_html_module> | ||
484 | +Include conf/extra/proxy-html.conf | ||
485 | +</IfModule> | ||
486 | + | ||
487 | +# Secure (SSL/TLS) connections | ||
488 | +#Include conf/extra/httpd-ssl.conf | ||
489 | +# | ||
490 | +# Note: The following must must be present to support | ||
491 | +# starting without SSL on platforms with no /dev/random equivalent | ||
492 | +# but a statically compiled-in mod_ssl. | ||
493 | +# | ||
494 | +<IfModule ssl_module> | ||
495 | +SSLRandomSeed startup builtin | ||
496 | +SSLRandomSeed connect builtin | ||
497 | +</IfModule> | ||
498 | +# | ||
499 | +# uncomment out the below to deal with user agents that deliberately | ||
500 | +# violate open standards by misusing DNT (DNT *must* be a specific | ||
501 | +# end-user choice) | ||
502 | +# | ||
503 | +#<IfModule setenvif_module> | ||
504 | +#BrowserMatch "MSIE 10.0;" bad_DNT | ||
505 | +#</IfModule> | ||
506 | +#<IfModule headers_module> | ||
507 | +#RequestHeader unset DNT env=bad_DNT | ||
508 | +#</IfModule> | ||
509 | + |
script/server/apache/test/test.yohobuy.conf
0 → 100644
1 | +<VirtualHost *:6060> | ||
2 | + ServerAdmin root@localhost | ||
3 | + CustomLog "/Data/logs/apache/yohobuy_web_access.log" combined | ||
4 | + ErrorLog "/Data/logs/apache/yohobuy_web_error.log" | ||
5 | + ServerName huodong.m.yohobuy.com | ||
6 | + DocumentRoot "/Data/code/git/yohobuy/yohobuy/huodong.m.yohobuy.com/public/" | ||
7 | + RewriteEngine on | ||
8 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
9 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
10 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
11 | + RewriteRule /home /index-test.php [L] | ||
12 | + RewriteRule ^/(.+)$ /index-test.php [L] | ||
13 | + | ||
14 | + <Directory /> | ||
15 | + LimitRequestBody 10485760 | ||
16 | + Options FollowSymLinks | ||
17 | + AllowOverride None | ||
18 | + Order allow,deny | ||
19 | + Allow from all | ||
20 | + Require all granted | ||
21 | + </Directory> | ||
22 | +</VirtualHost> | ||
23 | + | ||
24 | + | ||
25 | +<VirtualHost *:6060> | ||
26 | + ServerAdmin root@localhost | ||
27 | + CustomLog "/Data/logs/apache/yohobuy_access.log" combined | ||
28 | + ErrorLog "/Data/logs/apache/yohobuy_error.log" | ||
29 | + ServerName m.yohobuy.com | ||
30 | + ServerAlias *.m.yohobuy.com | ||
31 | + DocumentRoot "/Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public/" | ||
32 | + RewriteEngine on | ||
33 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
34 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
35 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
36 | + RewriteRule /home /index-test.php [L] | ||
37 | + RewriteRule ^/(.+)$ /index-test.php [L] | ||
38 | + <Directory /> | ||
39 | + LimitRequestBody 10485760 | ||
40 | + Options FollowSymLinks | ||
41 | + AllowOverride None | ||
42 | + Order allow,deny | ||
43 | + Allow from all | ||
44 | + Require all granted | ||
45 | + </Directory> | ||
46 | +</VirtualHost> | ||
47 | + | ||
48 | +<VirtualHost *:6060> | ||
49 | + ServerAdmin root@localhost | ||
50 | + CustomLog "/Data/logs/apache/yohobuy_web_access.log" combined | ||
51 | + ErrorLog "/Data/logs/apache/yohobuy_web_error.log" | ||
52 | + ServerName huodong.yohobuy.com | ||
53 | + DocumentRoot "/Data/code/git/web/yohobuy/yohobuy/huodong.yohobuy.com/public/" | ||
54 | + RewriteEngine on | ||
55 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
56 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
57 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
58 | + RewriteRule /home /index-test.php [L] | ||
59 | + RewriteRule ^/(.+)$ /index-test.php [L] | ||
60 | + <Directory /> | ||
61 | + LimitRequestBody 10485760 | ||
62 | + Options FollowSymLinks | ||
63 | + AllowOverride None | ||
64 | + Order allow,deny | ||
65 | + Allow from all | ||
66 | + Require all granted | ||
67 | + </Directory> | ||
68 | +</VirtualHost> | ||
69 | + | ||
70 | +<VirtualHost *:6060> | ||
71 | + ServerAdmin root@localhost | ||
72 | + CustomLog "/Data/logs/apache/yohobuy_web_access.log" combined | ||
73 | + ErrorLog "/Data/logs/apache/yohobuy_web_error.log" | ||
74 | + ServerName www.yohobuy.com | ||
75 | + ServerAlias *.yohobuy.com | ||
76 | + DocumentRoot "/Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public/" | ||
77 | + RewriteEngine on | ||
78 | + RewriteCond %{REQUEST_FILENAME} !-f | ||
79 | + RewriteCond %{REQUEST_FILENAME} !-d | ||
80 | + RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.svg|\.woff|\.eot|\.ttf)$ | ||
81 | + RewriteRule /home /index-test.php [L] | ||
82 | + RewriteRule ^/(.+)$ /index-test.php [L] | ||
83 | + <Directory /> | ||
84 | + LimitRequestBody 10485760 | ||
85 | + Options FollowSymLinks | ||
86 | + AllowOverride None | ||
87 | + Order allow,deny | ||
88 | + Allow from all | ||
89 | + Require all granted | ||
90 | + </Directory> | ||
91 | +</VirtualHost> |
script/server/nginx/rls/nginx.conf
0 → 100644
1 | +user www www; | ||
2 | + | ||
3 | +worker_processes 8; | ||
4 | +worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; | ||
5 | + | ||
6 | +pid /Data/local/nginx-1.8.0/logs/nginx.pid; | ||
7 | +# [ debug | info | notice | warn | error | crit ] | ||
8 | +error_log /Data/logs/nginx/nginx_error.log; | ||
9 | +#error_log /dev/null; | ||
10 | +#Specifies the value for maximum file descriptors that can be opened by this process. | ||
11 | +worker_rlimit_nofile 51200; | ||
12 | + | ||
13 | +events | ||
14 | +{ | ||
15 | + use epoll; | ||
16 | + | ||
17 | + #maxclient = worker_processes * worker_connections / cpu_number | ||
18 | + worker_connections 51200; | ||
19 | +} | ||
20 | + | ||
21 | +http | ||
22 | +{ | ||
23 | + include /Data/local/nginx-1.8.0/conf/mime.types; | ||
24 | + default_type application/octet-stream; | ||
25 | + #charset gb2312,utf-8; | ||
26 | + charset utf-8; | ||
27 | + | ||
28 | + log_format fenxi '$remote_addr|$http_x_forwarded_for|[$time_local]|$http_host|$request|' | ||
29 | + '$status|$body_bytes_sent|$request_time|$upstream_response_time|$upstream_cache_status|$http_referer|' | ||
30 | + '$upstream_addr|$http_user_agent'; | ||
31 | + | ||
32 | + #log_format main '$remote_addr - $remote_user [$time_local] $request $request_body ' | ||
33 | + # '"$status" $body_bytes_sent "$http_referer" ' | ||
34 | + # '"$http_user_agent" "$http_x_forwarded_for" "$request_time"'; | ||
35 | + | ||
36 | + # access_log /log/access.log main; | ||
37 | + #access_log /Data/logs/access_yohoshow.com.log main; | ||
38 | + | ||
39 | + #error_page 502 =200 /.busy.jpg; | ||
40 | + #error_page 403 = http://www.yohoboys.com; | ||
41 | + #error_page 404 = http://www.yohoboys.com; | ||
42 | + #General Options | ||
43 | + server_names_hash_bucket_size 128; | ||
44 | + client_header_buffer_size 32k; | ||
45 | + large_client_header_buffers 4 32k; | ||
46 | + client_body_buffer_size 8m; #256k | ||
47 | + # | ||
48 | + #server_tokens off; | ||
49 | + ignore_invalid_headers on; | ||
50 | + recursive_error_pages on; | ||
51 | + server_name_in_redirect off; | ||
52 | + | ||
53 | + sendfile on; | ||
54 | + | ||
55 | + #timeouts | ||
56 | + keepalive_timeout 60; | ||
57 | + #test | ||
58 | + #client_body_timeout 3m; | ||
59 | + #client_header_timeout 3m; | ||
60 | + #send_timeout 3m; | ||
61 | + | ||
62 | + | ||
63 | + #TCP Options | ||
64 | + tcp_nopush on; | ||
65 | + tcp_nodelay on; | ||
66 | + | ||
67 | + #fastcgi options | ||
68 | + fastcgi_connect_timeout 300; | ||
69 | + fastcgi_send_timeout 300; | ||
70 | + fastcgi_read_timeout 300; | ||
71 | + fastcgi_buffer_size 64k; | ||
72 | + fastcgi_buffers 4 64k; | ||
73 | + fastcgi_busy_buffers_size 128k; | ||
74 | + fastcgi_temp_file_write_size 128k; | ||
75 | + | ||
76 | +# set_real_ip_from 10.159.191.0/24; | ||
77 | +# real_ip_header X-Forwarded-For; | ||
78 | + | ||
79 | + #hiden php version | ||
80 | + fastcgi_hide_header X-Powered-By; | ||
81 | + | ||
82 | + #size limits | ||
83 | + client_max_body_size 50m; | ||
84 | + | ||
85 | + gzip on; | ||
86 | + gzip_min_length 1k; | ||
87 | + gzip_buffers 4 16k; | ||
88 | + gzip_http_version 1.0; | ||
89 | + gzip_comp_level 2; | ||
90 | + gzip_types text/plain application/x-javascript text/css application/xml; | ||
91 | + gzip_vary on; | ||
92 | + | ||
93 | + #proxy_temp_path /dev/shm/proxy_temp; | ||
94 | + proxy_temp_path /Data/local/nginx-1.8.0/ngx_temp_dir; | ||
95 | + proxy_cache_path /Data/local/nginx-1.8.0/ngx_cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=10g; | ||
96 | + proxy_connect_timeout 10; | ||
97 | + proxy_read_timeout 60; | ||
98 | + proxy_send_timeout 10; | ||
99 | + proxy_buffer_size 16k; | ||
100 | + proxy_buffers 4 64k; | ||
101 | + proxy_busy_buffers_size 128k; | ||
102 | + proxy_temp_file_write_size 128k; | ||
103 | + | ||
104 | + fastcgi_temp_path /dev/shm/fastcgi_temp; | ||
105 | + client_body_temp_path /dev/shm/client_body_temp; | ||
106 | + | ||
107 | + #upstream web | ||
108 | + upstream mapi { | ||
109 | + server 172.31.55.18:80 weight=6 max_fails=2 fail_timeout=5s; | ||
110 | + server 172.31.55.207:80 weight=3 max_fails=2 fail_timeout=5s; | ||
111 | + } | ||
112 | + | ||
113 | + | ||
114 | + upstream yohobuy { | ||
115 | + # ip_hash; | ||
116 | + server 172.31.23.111:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
117 | + server 172.31.31.146:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
118 | + server 172.31.16.147:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
119 | + server 172.31.21.139:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
120 | + server 172.31.25.17:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
121 | + server 172.31.22.1:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
122 | + server 172.31.20.56:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
123 | + } | ||
124 | + | ||
125 | + upstream yohobuy-pc { | ||
126 | + # ip_hash; | ||
127 | + server 172.31.23.111:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
128 | + server 172.31.31.146:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
129 | + server 172.31.16.147:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
130 | + server 172.31.21.139:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
131 | + server 172.31.25.17:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
132 | + server 172.31.22.1:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
133 | + server 172.31.20.56:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
134 | + } | ||
135 | + | ||
136 | + upstream yohobuy-old-www { | ||
137 | + # ip_hash; | ||
138 | + #server 119.254.81.247:80 weight=6 max_fails=2 fail_timeout=5s; | ||
139 | +# server 192.168.100.152:80 weight=6 max_fails=2 fail_timeout=5s; | ||
140 | +# server 192.168.100.161:80 weight=6 max_fails=2 fail_timeout=5s; | ||
141 | +# server 192.168.100.162:80 weight=6 max_fails=2 fail_timeout=5s; | ||
142 | +# server 192.168.100.17:80 weight=6 max_fails=2 fail_timeout=5s; | ||
143 | +# server 192.168.100.201:80 weight=6 max_fails=2 fail_timeout=5s; | ||
144 | + server 172.31.55.70:80 weight=3 max_fails=2 fail_timeout=5s; | ||
145 | + server 172.31.55.71:80 weight=3 max_fails=2 fail_timeout=5s; | ||
146 | + server 172.31.55.62:80 weight=6 max_fails=2 fail_timeout=5s; | ||
147 | + } | ||
148 | + | ||
149 | +# upstream yohobuy-www-abtest { | ||
150 | +# # ip_hash; | ||
151 | +# #server 119.254.81.247:80 weight=6 max_fails=2 fail_timeout=5s; | ||
152 | +# #server 192.168.100.152:80 weight=6 max_fails=2 fail_timeout=5s; | ||
153 | +# #server 192.168.100.161:80 weight=6 max_fails=2 fail_timeout=5s; | ||
154 | +# #server 192.168.100.162:80 weight=6 max_fails=2 fail_timeout=5s; | ||
155 | +# #server 192.168.100.17:80 weight=6 max_fails=2 fail_timeout=5s; | ||
156 | +# #server 192.168.100.201:80 weight=6 max_fails=2 fail_timeout=5s; | ||
157 | +# | ||
158 | +# server 172.31.23.111:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
159 | +# server 172.31.31.146:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
160 | +# server 172.31.16.147:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
161 | +# server 172.31.21.139:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
162 | +# server 172.31.25.17:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
163 | +# server 172.31.22.1:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
164 | +# server 172.31.20.56:8080 weight=6 max_fails=2 fail_timeout=5s; | ||
165 | +# } | ||
166 | + | ||
167 | +# upstream yohobuy-old-new { | ||
168 | +# # ip_hash; | ||
169 | +# #server 113.207.76.112:80 weight=6 max_fails=2 fail_timeout=5s; | ||
170 | +# server 123.57.37.213:80 weight=6 max_fails=2 fail_timeout=30s; | ||
171 | +# server 123.57.191.223:80 weight=6 max_fails=2 fail_timeout=30s; | ||
172 | +# server 123.57.189.248:80 weight=6 max_fails=2 fail_timeout=30s; | ||
173 | +# } | ||
174 | + | ||
175 | +# upstream yohobuy-old-product { | ||
176 | +# # ip_hash; | ||
177 | +# server 192.168.100.7:80 weight=6 max_fails=2 fail_timeout=5s; | ||
178 | +# server 192.168.100.123:80 weight=6 max_fails=2 fail_timeout=30s; | ||
179 | +# server 192.168.100.124:80 weight=6 max_fails=2 fail_timeout=30s; | ||
180 | +# server 192.168.100.21:80 weight=6 max_fails=2 fail_timeout=30s; | ||
181 | +# } | ||
182 | + | ||
183 | + upstream yohobuy-old-huodong { | ||
184 | + # ip_hash; | ||
185 | +# server 192.168.100.7:80 weight=6 max_fails=2 fail_timeout=5s; | ||
186 | +# server 192.168.100.21:80 weight=6 max_fails=2 fail_timeout=30s; | ||
187 | +# server 192.168.100.123:80 weight=6 max_fails=2 fail_timeout=30s; | ||
188 | +# server 192.168.100.124:80 weight=6 max_fails=2 fail_timeout=30s; | ||
189 | + server 172.31.55.207:80 weight=3 max_fails=2 fail_timeout=5s; | ||
190 | + server 172.31.55.18:80 weight=6 max_fails=2 fail_timeout=5s; | ||
191 | + } | ||
192 | + | ||
193 | + upstream yoho_service { | ||
194 | + server service.yoho.cn; | ||
195 | + } | ||
196 | + | ||
197 | + upstream unionapi{ | ||
198 | + server 172.31.16.99:8088; | ||
199 | + } | ||
200 | + | ||
201 | + #upstream | ||
202 | + fastcgi_next_upstream error timeout invalid_header http_500; | ||
203 | + | ||
204 | + #limit_zone limit $binary_remote_addr 1m; | ||
205 | + limit_req_zone $binary_remote_addr zone=one:50m rate=20r/s; | ||
206 | + limit_req_zone $binary_remote_addr zone=new:30m rate=50r/s; | ||
207 | + limit_req_zone $binary_remote_addr zone=hibox:10m rate=20r/s; | ||
208 | + | ||
209 | + #fastcgi cache | ||
210 | + #fastcgi_cache_path /nginxcache levels=1:2 keys_zone=two:10m inactive=1d max_size=3000m; | ||
211 | + #for example just for study! have fun! | ||
212 | + include vhosts/yohobuy.conf; | ||
213 | + include vhosts/yohobuy_pc.conf; | ||
214 | + include vhosts/login.m.yohobuy.com.conf; | ||
215 | +} |
script/server/nginx/rls/yohobuy_pc.conf
0 → 100644
1 | +server | ||
2 | +{ | ||
3 | + listen 80; | ||
4 | + server_name www.yohobuy.com *.yohobuy.com gray.yohobuy.com; | ||
5 | + root /Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public; | ||
6 | + access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; | ||
7 | + error_log /Data/logs/error.pc.yohobuy.com.log warn; | ||
8 | + | ||
9 | + location = /index.html { | ||
10 | + return 301 http://www.yohobuy.com/; | ||
11 | + } | ||
12 | + | ||
13 | + location ^~ /yohounion/ { | ||
14 | + proxy_redirect off; | ||
15 | + proxy_pass http://unionapi/union/; | ||
16 | + proxy_set_header Host $host; | ||
17 | + proxy_set_header X-Real-IP $http_x_forwarded_for; | ||
18 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
19 | + proxy_set_header Accept-Encoding "gzip"; | ||
20 | + } | ||
21 | + | ||
22 | + ##pc_alipay_notice | ||
23 | + location = /pay/notice/alimobilenoticemini { | ||
24 | + proxy_redirect off; | ||
25 | + proxy_pass http://yoho_service/payment/alipay_notify; | ||
26 | + proxy_set_header Host service.yoho.cn; | ||
27 | + proxy_set_header X-Real-IP $remote_addr; | ||
28 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
29 | + } | ||
30 | + | ||
31 | +# location ~ /test_lua { | ||
32 | +# default_type "text/html"; | ||
33 | +# set $a $1; | ||
34 | +# set $b $host; | ||
35 | +# content_by_lua_file /Data/test.lua; | ||
36 | +# } | ||
37 | +# | ||
38 | +# location = / { | ||
39 | +# proxy_redirect off; | ||
40 | +# proxy_pass http://yohobuy-www-abtest; | ||
41 | +# proxy_set_header Host $host; | ||
42 | +# proxy_set_header X-Real-IP $remote_addr; | ||
43 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
44 | +# proxy_set_header Accept-Encoding "gzip"; | ||
45 | +# } | ||
46 | + | ||
47 | + location = /woman { | ||
48 | + proxy_redirect off; | ||
49 | + proxy_pass http://yohobuy-pc; | ||
50 | + proxy_set_header Host $host; | ||
51 | + proxy_set_header X-Real-IP $remote_addr; | ||
52 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
53 | + proxy_set_header Accept-Encoding "gzip"; | ||
54 | + } | ||
55 | + location = /kids { | ||
56 | + proxy_redirect off; | ||
57 | + proxy_pass http://yohobuy-pc; | ||
58 | + proxy_set_header Host $host; | ||
59 | + proxy_set_header X-Real-IP $remote_addr; | ||
60 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
61 | + proxy_set_header Accept-Encoding "gzip"; | ||
62 | + } | ||
63 | + location = /lifestyle { | ||
64 | + proxy_redirect off; | ||
65 | + proxy_pass http://yohobuy-pc; | ||
66 | + proxy_set_header Host $host; | ||
67 | + proxy_set_header X-Real-IP $remote_addr; | ||
68 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
69 | + proxy_set_header Accept-Encoding "gzip"; | ||
70 | + } | ||
71 | + | ||
72 | + location ^~ /common { | ||
73 | + proxy_redirect off; | ||
74 | + proxy_pass http://yohobuy-pc; | ||
75 | + proxy_set_header Host $host; | ||
76 | + proxy_set_header X-Real-IP $remote_addr; | ||
77 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
78 | + proxy_set_header Accept-Encoding "gzip"; | ||
79 | + } | ||
80 | + | ||
81 | + location = /brands { | ||
82 | + proxy_redirect off; | ||
83 | + proxy_pass http://yohobuy-pc; | ||
84 | + proxy_set_header Host $host; | ||
85 | + proxy_set_header X-Real-IP $remote_addr; | ||
86 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
87 | + proxy_set_header Accept-Encoding "gzip"; | ||
88 | + } | ||
89 | + location ^~ /brands/plusstar { | ||
90 | + proxy_redirect off; | ||
91 | + proxy_pass http://yohobuy-pc; | ||
92 | + proxy_set_header Host $host; | ||
93 | + proxy_set_header X-Real-IP $remote_addr; | ||
94 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
95 | + proxy_set_header Accept-Encoding "gzip"; | ||
96 | + } | ||
97 | + location ^~ /brands/brandList { | ||
98 | + proxy_redirect off; | ||
99 | + proxy_pass http://yohobuy-pc; | ||
100 | + proxy_set_header Host $host; | ||
101 | + proxy_set_header X-Real-IP $remote_addr; | ||
102 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
103 | + proxy_set_header Accept-Encoding "gzip"; | ||
104 | + } | ||
105 | + location ^~ /brands/brandinfo { | ||
106 | + proxy_redirect off; | ||
107 | + proxy_pass http://yohobuy-pc; | ||
108 | + proxy_set_header Host $host; | ||
109 | + proxy_set_header X-Real-IP $remote_addr; | ||
110 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
111 | + proxy_set_header Accept-Encoding "gzip"; | ||
112 | + } | ||
113 | + location ^~ /tools { | ||
114 | + proxy_redirect off; | ||
115 | + proxy_pass http://yohobuy-pc; | ||
116 | + proxy_set_header Host $host; | ||
117 | + proxy_set_header X-Real-IP $remote_addr; | ||
118 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
119 | + proxy_set_header Accept-Encoding "gzip"; | ||
120 | + } | ||
121 | + | ||
122 | + location = /error.html { | ||
123 | + proxy_redirect off; | ||
124 | + proxy_pass http://yohobuy-pc; | ||
125 | + proxy_set_header Host $host; | ||
126 | + proxy_set_header X-Real-IP $remote_addr; | ||
127 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
128 | + proxy_set_header Accept-Encoding "gzip"; | ||
129 | + } | ||
130 | + | ||
131 | + location = /signin.html { | ||
132 | + proxy_redirect off; | ||
133 | + proxy_pass http://yohobuy-pc; | ||
134 | + proxy_set_header Host $host; | ||
135 | + proxy_set_header X-Real-IP $remote_addr; | ||
136 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
137 | + proxy_set_header Accept-Encoding "gzip"; | ||
138 | + } | ||
139 | + location = /logout.html { | ||
140 | + proxy_redirect off; | ||
141 | + proxy_pass http://yohobuy-pc; | ||
142 | + proxy_set_header Host $host; | ||
143 | + proxy_set_header X-Real-IP $remote_addr; | ||
144 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
145 | + proxy_set_header Accept-Encoding "gzip"; | ||
146 | + } | ||
147 | + location ^~ /logout_ { | ||
148 | + rewrite ^/logout_(.+).html http://www.yohobuy.com/logout.html?token=$1; | ||
149 | + } | ||
150 | + location = /reg.html { | ||
151 | + proxy_redirect off; | ||
152 | + proxy_pass http://yohobuy-pc; | ||
153 | + proxy_set_header Host $host; | ||
154 | + proxy_set_header X-Real-IP $remote_addr; | ||
155 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
156 | + proxy_set_header Accept-Encoding "gzip"; | ||
157 | + } | ||
158 | + location ^~ /passport/login/ { | ||
159 | + proxy_redirect off; | ||
160 | + proxy_pass http://yohobuy-pc; | ||
161 | + proxy_set_header Host $host; | ||
162 | + proxy_set_header X-Real-IP $remote_addr; | ||
163 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
164 | + proxy_set_header Accept-Encoding "gzip"; | ||
165 | + } | ||
166 | + location ^~ /passport/register/ { | ||
167 | + proxy_redirect off; | ||
168 | + proxy_pass http://yohobuy-pc; | ||
169 | + proxy_set_header Host $host; | ||
170 | + proxy_set_header X-Real-IP $remote_addr; | ||
171 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
172 | + proxy_set_header Accept-Encoding "gzip"; | ||
173 | + } | ||
174 | + location ^~ /passport/images { | ||
175 | + proxy_redirect off; | ||
176 | + proxy_pass http://yohobuy-pc; | ||
177 | + proxy_set_header Host $host; | ||
178 | + proxy_set_header X-Real-IP $remote_addr; | ||
179 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
180 | + proxy_set_header Accept-Encoding "gzip"; | ||
181 | + } | ||
182 | + location ^~ /passport/back/ { | ||
183 | + proxy_redirect off; | ||
184 | + proxy_pass http://yohobuy-pc; | ||
185 | + proxy_set_header Host $host; | ||
186 | + proxy_set_header X-Real-IP $remote_addr; | ||
187 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
188 | + proxy_set_header Accept-Encoding "gzip"; | ||
189 | + } | ||
190 | + location = /passport/autosign/wechat { | ||
191 | + proxy_redirect off; | ||
192 | + proxy_pass http://yohobuy-pc; | ||
193 | + proxy_set_header Host $host; | ||
194 | + proxy_set_header X-Real-IP $remote_addr; | ||
195 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
196 | + proxy_set_header Accept-Encoding "gzip"; | ||
197 | + } | ||
198 | + location ^~ /passport/autosign/ { | ||
199 | + proxy_redirect off; | ||
200 | + proxy_pass http://yohobuy-pc; | ||
201 | + proxy_set_header Host $host; | ||
202 | + proxy_set_header X-Real-IP $remote_addr; | ||
203 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
204 | + proxy_set_header Accept-Encoding "gzip"; | ||
205 | + } | ||
206 | + location ^~ /passport/autouserinfo/ { | ||
207 | + proxy_redirect off; | ||
208 | + proxy_pass http://yohobuy-pc; | ||
209 | + proxy_set_header Host $host; | ||
210 | + proxy_set_header X-Real-IP $remote_addr; | ||
211 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
212 | + proxy_set_header Accept-Encoding "gzip"; | ||
213 | + } | ||
214 | + location ^~ /passport/thirdlogin/ { | ||
215 | + proxy_redirect off; | ||
216 | + proxy_pass http://yohobuy-pc; | ||
217 | + proxy_set_header Host $host; | ||
218 | + proxy_set_header X-Real-IP $remote_addr; | ||
219 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
220 | + proxy_set_header Accept-Encoding "gzip"; | ||
221 | + } | ||
222 | + | ||
223 | + location = /new { | ||
224 | + proxy_redirect off; | ||
225 | + proxy_pass http://yohobuy-pc; | ||
226 | + proxy_set_header Host $host; | ||
227 | + proxy_set_header X-Real-IP $remote_addr; | ||
228 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
229 | + proxy_set_header Accept-Encoding "gzip"; | ||
230 | + } | ||
231 | + location = /sale { | ||
232 | + proxy_redirect off; | ||
233 | + proxy_pass http://yohobuy-pc; | ||
234 | + proxy_set_header Host $host; | ||
235 | + proxy_set_header X-Real-IP $remote_addr; | ||
236 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
237 | + proxy_set_header Accept-Encoding "gzip"; | ||
238 | + } | ||
239 | + location = /product/list/getProductPic { | ||
240 | + proxy_redirect off; | ||
241 | + proxy_pass http://yohobuy-pc; | ||
242 | + proxy_set_header Host $host; | ||
243 | + proxy_set_header X-Real-IP $remote_addr; | ||
244 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
245 | + proxy_set_header Accept-Encoding "gzip"; | ||
246 | + } | ||
247 | + location = /api/suggest { | ||
248 | + proxy_redirect off; | ||
249 | + proxy_pass http://yohobuy-pc; | ||
250 | + proxy_set_header Host $host; | ||
251 | + proxy_set_header X-Real-IP $remote_addr; | ||
252 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
253 | + proxy_set_header Accept-Encoding "gzip"; | ||
254 | + } | ||
255 | + location = /error { | ||
256 | + proxy_redirect off; | ||
257 | + proxy_pass http://yohobuy-pc; | ||
258 | + proxy_set_header Host $host; | ||
259 | + proxy_set_header X-Real-IP $remote_addr; | ||
260 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
261 | + proxy_set_header Accept-Encoding "gzip"; | ||
262 | + } | ||
263 | + location = /about { | ||
264 | + proxy_redirect off; | ||
265 | + proxy_pass http://yohobuy-pc; | ||
266 | + proxy_set_header Host $host; | ||
267 | + proxy_set_header X-Real-IP $remote_addr; | ||
268 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
269 | + proxy_set_header Accept-Encoding "gzip"; | ||
270 | + } | ||
271 | + location = /hotrank { | ||
272 | + proxy_redirect off; | ||
273 | + proxy_pass http://yohobuy-pc; | ||
274 | + proxy_set_header Host $host; | ||
275 | + proxy_set_header X-Real-IP $remote_addr; | ||
276 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
277 | + proxy_set_header Accept-Encoding "gzip"; | ||
278 | + } | ||
279 | + location = /product/search/sortSize { | ||
280 | + proxy_redirect off; | ||
281 | + proxy_pass http://yohobuy-pc; | ||
282 | + proxy_set_header Host $host; | ||
283 | + proxy_set_header X-Real-IP $remote_addr; | ||
284 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
285 | + proxy_set_header Accept-Encoding "gzip"; | ||
286 | + } | ||
287 | + location = /product/index/favoriteBrand { | ||
288 | + proxy_redirect off; | ||
289 | + proxy_pass http://yohobuy-pc; | ||
290 | + proxy_set_header Host $host; | ||
291 | + proxy_set_header X-Real-IP $remote_addr; | ||
292 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
293 | + proxy_set_header Accept-Encoding "gzip"; | ||
294 | + } | ||
295 | + location = /product/index/isFavoriteBrand { | ||
296 | + proxy_redirect off; | ||
297 | + proxy_pass http://yohobuy-pc; | ||
298 | + proxy_set_header Host $host; | ||
299 | + proxy_set_header X-Real-IP $remote_addr; | ||
300 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
301 | + proxy_set_header Accept-Encoding "gzip"; | ||
302 | + } | ||
303 | + location = /product/index/getNodeContent { | ||
304 | + proxy_redirect off; | ||
305 | + proxy_pass http://yohobuy-pc; | ||
306 | + proxy_set_header Host $host; | ||
307 | + proxy_set_header X-Real-IP $remote_addr; | ||
308 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
309 | + proxy_set_header Accept-Encoding "gzip"; | ||
310 | + } | ||
311 | + location = /product/index/getAdnav { | ||
312 | + proxy_redirect off; | ||
313 | + proxy_pass http://yohobuy-pc; | ||
314 | + proxy_set_header Host $host; | ||
315 | + proxy_set_header X-Real-IP $remote_addr; | ||
316 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
317 | + proxy_set_header Accept-Encoding "gzip"; | ||
318 | + } | ||
319 | + | ||
320 | + location ^~ /product/pro_ { | ||
321 | + return 301 http://item.yohobuy.com$request_uri; | ||
322 | + } | ||
323 | + location ^~ /product/item/ { | ||
324 | + proxy_redirect off; | ||
325 | + proxy_pass http://yohobuy-pc; | ||
326 | + proxy_set_header Host $host; | ||
327 | + proxy_set_header X-Real-IP $remote_addr; | ||
328 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
329 | + proxy_set_header Accept-Encoding "gzip"; | ||
330 | + } | ||
331 | + location ^~ /cart/index { | ||
332 | + proxy_redirect off; | ||
333 | + proxy_pass http://yohobuy-pc; | ||
334 | + proxy_set_header Host $host; | ||
335 | + proxy_set_header X-Real-IP $remote_addr; | ||
336 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
337 | + proxy_set_header Accept-Encoding "gzip"; | ||
338 | + } | ||
339 | + location ^~ /shopping/cart { | ||
340 | + proxy_redirect off; | ||
341 | + proxy_pass http://yohobuy-pc; | ||
342 | + proxy_set_header Host $host; | ||
343 | + proxy_set_header X-Real-IP $remote_addr; | ||
344 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
345 | + proxy_set_header Accept-Encoding "gzip"; | ||
346 | + } | ||
347 | + location ^~ /product/show_ { | ||
348 | + proxy_redirect off; | ||
349 | + proxy_pass http://yohobuy-pc; | ||
350 | + proxy_set_header Host $host; | ||
351 | + proxy_set_header X-Real-IP $remote_addr; | ||
352 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
353 | + proxy_set_header Accept-Encoding "gzip"; | ||
354 | + } | ||
355 | + | ||
356 | + location ^~ /home { | ||
357 | + proxy_redirect off; | ||
358 | + proxy_pass http://yohobuy-pc; | ||
359 | + proxy_set_header Host $host; | ||
360 | + proxy_set_header X-Real-IP $remote_addr; | ||
361 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
362 | + proxy_set_header Accept-Encoding "gzip"; | ||
363 | + } | ||
364 | + | ||
365 | + location ^~ /help{ | ||
366 | + proxy_redirect off; | ||
367 | + proxy_pass http://yohobuy-pc; | ||
368 | + proxy_set_header Host $host; | ||
369 | + proxy_set_header X-Real-IP $remote_addr; | ||
370 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
371 | + proxy_set_header Accept-Encoding "gzip"; | ||
372 | + } | ||
373 | + | ||
374 | + location ^~ /pay { | ||
375 | + proxy_redirect off; | ||
376 | + proxy_pass http://yohobuy-pc; | ||
377 | + proxy_set_header Host $host; | ||
378 | + proxy_set_header X-Real-IP $remote_addr; | ||
379 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
380 | + proxy_set_header Accept-Encoding "gzip"; | ||
381 | + } | ||
382 | + | ||
383 | + location ^~ /shopping/pay { | ||
384 | + proxy_pass http://yohobuy-pc; | ||
385 | + proxy_set_header Host $host; | ||
386 | + proxy_set_header X-Real-IP $remote_addr; | ||
387 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
388 | + proxy_set_header Accept-Encoding "gzip"; | ||
389 | + } | ||
390 | + | ||
391 | + location ^~ /brands/ { | ||
392 | + rewrite /brands/$ http://www.yohobuy.com/brands permanent; | ||
393 | + } | ||
394 | + location ^~ /discount { | ||
395 | + rewrite /discount http://search.yohobuy.com permanent; | ||
396 | + } | ||
397 | + | ||
398 | + location ^~ /gallery { | ||
399 | + rewrite /gallery http://www.yohobuy.com permanent; | ||
400 | + } | ||
401 | + | ||
402 | + location ^~ /lookbook { | ||
403 | + rewrite /lookbook http://guang.yohobuy.com permanent; | ||
404 | + } | ||
405 | + | ||
406 | + location ^~ /trends { | ||
407 | + rewrite /trends http://guang.yohobuy.com permanent; | ||
408 | + } | ||
409 | + | ||
410 | + location ^~ /promotion { | ||
411 | + rewrite /promotion http://list.yohobuy.com/sale permanent; | ||
412 | + } | ||
413 | + | ||
414 | + location /product/new { | ||
415 | + rewrite ^/product/new(.*)$ http://list.yohobuy.com/new$1 permanent; | ||
416 | + } | ||
417 | + | ||
418 | + location ^~ /product/exhibit { | ||
419 | + rewrite /product/exhibit http://www.yohobuy.com permanent; | ||
420 | + } | ||
421 | + | ||
422 | + location /index/guide { | ||
423 | + proxy_redirect off; | ||
424 | + proxy_pass http://yohobuy-pc; | ||
425 | + proxy_set_header Host $host; | ||
426 | + proxy_set_header X-Real-IP $remote_addr; | ||
427 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
428 | + proxy_set_header Accept-Encoding "gzip"; | ||
429 | + } | ||
430 | + | ||
431 | + location ^~ /contact.html { | ||
432 | +proxy_redirect off; | ||
433 | +proxy_pass http://yohobuy-pc; | ||
434 | +proxy_set_header Host $host; | ||
435 | +proxy_set_header X-Real-IP $remote_addr; | ||
436 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
437 | +proxy_set_header Accept-Encoding "gzip"; | ||
438 | +} | ||
439 | +location ^~ /yohobuy.html { | ||
440 | +proxy_redirect off; | ||
441 | +proxy_pass http://yohobuy-pc; | ||
442 | +proxy_set_header Host $host; | ||
443 | +proxy_set_header X-Real-IP $remote_addr; | ||
444 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
445 | +proxy_set_header Accept-Encoding "gzip"; | ||
446 | +} | ||
447 | +location ^~ /newpower.html { | ||
448 | +proxy_redirect off; | ||
449 | +proxy_pass http://yohobuy-pc; | ||
450 | +proxy_set_header Host $host; | ||
451 | +proxy_set_header X-Real-IP $remote_addr; | ||
452 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
453 | +proxy_set_header Accept-Encoding "gzip"; | ||
454 | +} | ||
455 | +location ^~ /privacy.html { | ||
456 | +proxy_redirect off; | ||
457 | +proxy_pass http://yohobuy-pc; | ||
458 | +proxy_set_header Host $host; | ||
459 | +proxy_set_header X-Real-IP $remote_addr; | ||
460 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
461 | +proxy_set_header Accept-Encoding "gzip"; | ||
462 | +} | ||
463 | +location ^~ /link.html { | ||
464 | +proxy_redirect off; | ||
465 | +proxy_pass http://yohobuy-pc; | ||
466 | +proxy_set_header Host $host; | ||
467 | +proxy_set_header X-Real-IP $remote_addr; | ||
468 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
469 | +proxy_set_header Accept-Encoding "gzip"; | ||
470 | +} | ||
471 | + location ^~ /download/app { | ||
472 | +proxy_redirect off; | ||
473 | +proxy_pass http://yohobuy-pc; | ||
474 | +proxy_set_header Host $host; | ||
475 | +proxy_set_header X-Real-IP $remote_addr; | ||
476 | +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
477 | +proxy_set_header Accept-Encoding "gzip"; | ||
478 | +} | ||
479 | + | ||
480 | + location /coupon { | ||
481 | + proxy_redirect off; | ||
482 | + proxy_pass http://yohobuy-pc; | ||
483 | + proxy_set_header Host $host; | ||
484 | + proxy_set_header X-Real-IP $remote_addr; | ||
485 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
486 | + proxy_set_header Accept-Encoding "gzip"; | ||
487 | + } | ||
488 | + | ||
489 | + location = / { | ||
490 | + proxy_redirect off; | ||
491 | + proxy_pass http://yohobuy-pc; | ||
492 | + proxy_set_header Host $host; | ||
493 | + proxy_set_header X-Real-IP $remote_addr; | ||
494 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
495 | + proxy_set_header Accept-Encoding "gzip"; | ||
496 | + } | ||
497 | + | ||
498 | + location / { | ||
499 | + access_log /Data/logs/access.www.yohobuy.com.log fenxi; | ||
500 | + proxy_redirect off; | ||
501 | + proxy_pass http://yohobuy-old-www; | ||
502 | + proxy_set_header Host $host; | ||
503 | + proxy_set_header X-Real-IP $remote_addr; | ||
504 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
505 | + proxy_set_header Accept-Encoding "gzip"; | ||
506 | + } | ||
507 | + | ||
508 | + location =/favicon.ico { | ||
509 | + expires 30d; | ||
510 | + } | ||
511 | + location =/crossdomain.xml { | ||
512 | + expires 30d; | ||
513 | + } | ||
514 | + location =/robots.txt { | ||
515 | + expires 1d; | ||
516 | + } | ||
517 | +} | ||
518 | + | ||
519 | +server | ||
520 | +{ | ||
521 | + listen 80; | ||
522 | + server_name new.yohobuy.com; | ||
523 | + root /Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public; | ||
524 | + | ||
525 | + location = / { | ||
526 | + proxy_redirect off; | ||
527 | + proxy_pass http://yohobuy-pc; | ||
528 | + proxy_set_header Host $host; | ||
529 | + proxy_set_header X-Real-IP $remote_addr; | ||
530 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
531 | + proxy_set_header Accept-Encoding "gzip"; | ||
532 | + } | ||
533 | + location = /woman { | ||
534 | + proxy_redirect off; | ||
535 | + proxy_pass http://yohobuy-pc; | ||
536 | + proxy_set_header Host $host; | ||
537 | + proxy_set_header X-Real-IP $remote_addr; | ||
538 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
539 | + proxy_set_header Accept-Encoding "gzip"; | ||
540 | + } | ||
541 | + location = /kids { | ||
542 | + proxy_redirect off; | ||
543 | + proxy_pass http://yohobuy-pc; | ||
544 | + proxy_set_header Host $host; | ||
545 | + proxy_set_header X-Real-IP $remote_addr; | ||
546 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
547 | + proxy_set_header Accept-Encoding "gzip"; | ||
548 | + } | ||
549 | + location = /lifestyle { | ||
550 | + proxy_redirect off; | ||
551 | + proxy_pass http://yohobuy-pc; | ||
552 | + proxy_set_header Host $host; | ||
553 | + proxy_set_header X-Real-IP $remote_addr; | ||
554 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
555 | + proxy_set_header Accept-Encoding "gzip"; | ||
556 | + } | ||
557 | + | ||
558 | + location ^~ /common { | ||
559 | + proxy_redirect off; | ||
560 | + proxy_pass http://yohobuy-pc; | ||
561 | + proxy_set_header Host $host; | ||
562 | + proxy_set_header X-Real-IP $remote_addr; | ||
563 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
564 | + proxy_set_header Accept-Encoding "gzip"; | ||
565 | + } | ||
566 | + | ||
567 | +# location / { | ||
568 | +# access_log /Data/logs/access.www.yohobuy.com.log fenxi; | ||
569 | +# proxy_redirect off; | ||
570 | +# proxy_pass http://yohobuy-old-new; | ||
571 | +# proxy_set_header Host $host; | ||
572 | +# proxy_set_header X-Real-IP $remote_addr; | ||
573 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
574 | +# proxy_set_header Accept-Encoding "gzip"; | ||
575 | +# } | ||
576 | + | ||
577 | + location ^~ /tools { | ||
578 | + proxy_redirect off; | ||
579 | + proxy_pass http://yohobuy-pc; | ||
580 | + proxy_set_header Host $host; | ||
581 | + proxy_set_header X-Real-IP $remote_addr; | ||
582 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
583 | + proxy_set_header Accept-Encoding "gzip"; | ||
584 | + } | ||
585 | + | ||
586 | + location = /brands { | ||
587 | + proxy_redirect off; | ||
588 | + proxy_pass http://yohobuy-pc; | ||
589 | + proxy_set_header Host $host; | ||
590 | + proxy_set_header X-Real-IP $remote_addr; | ||
591 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
592 | + proxy_set_header Accept-Encoding "gzip"; | ||
593 | + } | ||
594 | + location ^~ /brands/plusstar { | ||
595 | + proxy_redirect off; | ||
596 | + proxy_pass http://yohobuy-pc; | ||
597 | + proxy_set_header Host $host; | ||
598 | + proxy_set_header X-Real-IP $remote_addr; | ||
599 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
600 | + proxy_set_header Accept-Encoding "gzip"; | ||
601 | + } | ||
602 | + location ^~ /brands/brandList { | ||
603 | + proxy_redirect off; | ||
604 | + proxy_pass http://yohobuy-pc; | ||
605 | + proxy_set_header Host $host; | ||
606 | + proxy_set_header X-Real-IP $remote_addr; | ||
607 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
608 | + proxy_set_header Accept-Encoding "gzip"; | ||
609 | + } | ||
610 | + location ^~ /brands/brandinfo { | ||
611 | + proxy_redirect off; | ||
612 | + proxy_pass http://yohobuy-pc; | ||
613 | + proxy_set_header Host $host; | ||
614 | + proxy_set_header X-Real-IP $remote_addr; | ||
615 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
616 | + proxy_set_header Accept-Encoding "gzip"; | ||
617 | + } | ||
618 | + | ||
619 | + location ^~ /resource/getbanner { | ||
620 | + rewrite /resource/getbanner(.*)$ http://www.yohobuy.com/common/getbanner$1 permanent; | ||
621 | + } | ||
622 | + | ||
623 | + location =/favicon.ico { | ||
624 | + expires 30d; | ||
625 | + } | ||
626 | + location =/crossdomain.xml { | ||
627 | + expires 30d; | ||
628 | + } | ||
629 | + location =/robots.txt { | ||
630 | + expires 1d; | ||
631 | + } | ||
632 | +} | ||
633 | + | ||
634 | +server | ||
635 | +{ | ||
636 | + listen 80; | ||
637 | + server_name list.yohobuy.com search.yohobuy.com item.yohobuy.com sale.yohobuy.com; | ||
638 | + root /Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public; | ||
639 | + | ||
640 | + location = / { | ||
641 | + proxy_redirect off; | ||
642 | + proxy_pass http://yohobuy-pc; | ||
643 | + proxy_set_header Host $host; | ||
644 | + proxy_set_header X-Real-IP $remote_addr; | ||
645 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
646 | + proxy_set_header Accept-Encoding "gzip"; | ||
647 | + } | ||
648 | + location ^~ /common { | ||
649 | + proxy_redirect off; | ||
650 | + proxy_pass http://yohobuy-pc; | ||
651 | + proxy_set_header Host $host; | ||
652 | + proxy_set_header X-Real-IP $remote_addr; | ||
653 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
654 | + proxy_set_header Accept-Encoding "gzip"; | ||
655 | + } | ||
656 | + | ||
657 | + location = /new { | ||
658 | + proxy_redirect off; | ||
659 | + proxy_pass http://yohobuy-pc; | ||
660 | + proxy_set_header Host $host; | ||
661 | + proxy_set_header X-Real-IP $remote_addr; | ||
662 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
663 | + proxy_set_header Accept-Encoding "gzip"; | ||
664 | + } | ||
665 | + location = /sale { | ||
666 | + proxy_redirect off; | ||
667 | + proxy_pass http://yohobuy-pc; | ||
668 | + proxy_set_header Host $host; | ||
669 | + proxy_set_header X-Real-IP $remote_addr; | ||
670 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
671 | + proxy_set_header Accept-Encoding "gzip"; | ||
672 | + } | ||
673 | + location = /product/list/getProductPic { | ||
674 | + proxy_redirect off; | ||
675 | + proxy_pass http://yohobuy-pc; | ||
676 | + proxy_set_header Host $host; | ||
677 | + proxy_set_header X-Real-IP $remote_addr; | ||
678 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
679 | + proxy_set_header Accept-Encoding "gzip"; | ||
680 | + } | ||
681 | + location = /api/suggest { | ||
682 | + proxy_redirect off; | ||
683 | + proxy_pass http://yohobuy-pc; | ||
684 | + proxy_set_header Host $host; | ||
685 | + proxy_set_header X-Real-IP $remote_addr; | ||
686 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
687 | + proxy_set_header Accept-Encoding "gzip"; | ||
688 | + } | ||
689 | + location = /error { | ||
690 | + proxy_redirect off; | ||
691 | + proxy_pass http://yohobuy-pc; | ||
692 | + proxy_set_header Host $host; | ||
693 | + proxy_set_header X-Real-IP $remote_addr; | ||
694 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
695 | + proxy_set_header Accept-Encoding "gzip"; | ||
696 | + } | ||
697 | + location = /about { | ||
698 | + proxy_redirect off; | ||
699 | + proxy_pass http://yohobuy-pc; | ||
700 | + proxy_set_header Host $host; | ||
701 | + proxy_set_header X-Real-IP $remote_addr; | ||
702 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
703 | + proxy_set_header Accept-Encoding "gzip"; | ||
704 | + } | ||
705 | + location = /hotrank { | ||
706 | + proxy_redirect off; | ||
707 | + proxy_pass http://yohobuy-pc; | ||
708 | + proxy_set_header Host $host; | ||
709 | + proxy_set_header X-Real-IP $remote_addr; | ||
710 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
711 | + proxy_set_header Accept-Encoding "gzip"; | ||
712 | + } | ||
713 | + location = /product/search/sortSize { | ||
714 | + proxy_redirect off; | ||
715 | + proxy_pass http://yohobuy-pc; | ||
716 | + proxy_set_header Host $host; | ||
717 | + proxy_set_header X-Real-IP $remote_addr; | ||
718 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
719 | + proxy_set_header Accept-Encoding "gzip"; | ||
720 | + } | ||
721 | + location = /product/index/favoriteBrand { | ||
722 | + proxy_redirect off; | ||
723 | + proxy_pass http://yohobuy-pc; | ||
724 | + proxy_set_header Host $host; | ||
725 | + proxy_set_header X-Real-IP $remote_addr; | ||
726 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
727 | + proxy_set_header Accept-Encoding "gzip"; | ||
728 | + } | ||
729 | + location = /product/index/isFavoriteBrand { | ||
730 | + proxy_redirect off; | ||
731 | + proxy_pass http://yohobuy-pc; | ||
732 | + proxy_set_header Host $host; | ||
733 | + proxy_set_header X-Real-IP $remote_addr; | ||
734 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
735 | + proxy_set_header Accept-Encoding "gzip"; | ||
736 | + } | ||
737 | + location = /product/index/getNodeContent { | ||
738 | + proxy_redirect off; | ||
739 | + proxy_pass http://yohobuy-pc; | ||
740 | + proxy_set_header Host $host; | ||
741 | + proxy_set_header X-Real-IP $remote_addr; | ||
742 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
743 | + proxy_set_header Accept-Encoding "gzip"; | ||
744 | + } | ||
745 | + location = /product/index/getAdnav { | ||
746 | + proxy_redirect off; | ||
747 | + proxy_pass http://yohobuy-pc; | ||
748 | + proxy_set_header Host $host; | ||
749 | + proxy_set_header X-Real-IP $remote_addr; | ||
750 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
751 | + proxy_set_header Accept-Encoding "gzip"; | ||
752 | + } | ||
753 | + | ||
754 | + location ^~ /product/item/ { | ||
755 | + proxy_redirect off; | ||
756 | + proxy_pass http://yohobuy-pc; | ||
757 | + proxy_set_header Host $host; | ||
758 | + proxy_set_header X-Real-IP $remote_addr; | ||
759 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
760 | + proxy_set_header Accept-Encoding "gzip"; | ||
761 | + } | ||
762 | + location ^~ /product/pro_ { | ||
763 | + proxy_redirect off; | ||
764 | + proxy_pass http://yohobuy-pc; | ||
765 | + proxy_set_header Host $host; | ||
766 | + proxy_set_header X-Real-IP $remote_addr; | ||
767 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
768 | + proxy_set_header Accept-Encoding "gzip"; | ||
769 | + } | ||
770 | + location ^~ /product/show_ { | ||
771 | + proxy_redirect off; | ||
772 | + proxy_pass http://yohobuy-pc; | ||
773 | + proxy_set_header Host $host; | ||
774 | + proxy_set_header X-Real-IP $remote_addr; | ||
775 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
776 | + proxy_set_header Accept-Encoding "gzip"; | ||
777 | + } | ||
778 | + | ||
779 | + location ^~ /cart/index { | ||
780 | + proxy_redirect off; | ||
781 | + proxy_pass http://yohobuy-pc; | ||
782 | + proxy_set_header Host $host; | ||
783 | + proxy_set_header X-Real-IP $remote_addr; | ||
784 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
785 | + proxy_set_header Accept-Encoding "gzip"; | ||
786 | + } | ||
787 | + | ||
788 | +# location / { | ||
789 | +# access_log /Data/logs/access.www.yohobuy.com.log fenxi; | ||
790 | +# proxy_redirect off; | ||
791 | +# proxy_pass http://yohobuy-old-product; | ||
792 | +# proxy_set_header Host $host; | ||
793 | +# proxy_set_header X-Real-IP $remote_addr; | ||
794 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
795 | +# proxy_set_header Accept-Encoding "gzip"; | ||
796 | +# } | ||
797 | + | ||
798 | + location =/favicon.ico { | ||
799 | + expires 30d; | ||
800 | + } | ||
801 | + location =/crossdomain.xml { | ||
802 | + expires 30d; | ||
803 | + } | ||
804 | + location =/robots.txt { | ||
805 | + expires 1d; | ||
806 | + } | ||
807 | + | ||
808 | + location ^~ /purge/product { | ||
809 | + default_type application/json; | ||
810 | + return 200 '{}'; | ||
811 | + } | ||
812 | +} | ||
813 | + | ||
814 | +server | ||
815 | +{ | ||
816 | + listen 80; | ||
817 | + server_name guang.yohobuy.com; | ||
818 | + | ||
819 | + location / { | ||
820 | + root /Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public; | ||
821 | + index index.php; | ||
822 | + proxy_redirect off; | ||
823 | + proxy_pass http://yohobuy; | ||
824 | + proxy_set_header Host $host; | ||
825 | + proxy_set_header X-Real-IP $remote_addr; | ||
826 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
827 | + proxy_set_header Accept-Encoding "gzip"; | ||
828 | + } | ||
829 | +} | ||
830 | + | ||
831 | +server | ||
832 | +{ | ||
833 | + listen 80; | ||
834 | + server_name huodong.yohobuy.com; | ||
835 | + root /Data/PE/yohobuy_pc/yohobuy/huodong.yohobuy.com/public; | ||
836 | + | ||
837 | + location ^~ /cuxiao { | ||
838 | + proxy_redirect off; | ||
839 | + proxy_pass http://yohobuy-pc; | ||
840 | + proxy_set_header Host $host; | ||
841 | + proxy_set_header X-Real-IP $remote_addr; | ||
842 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
843 | + proxy_set_header Accept-Encoding "gzip"; | ||
844 | + } | ||
845 | + | ||
846 | + location / { | ||
847 | + access_log /Data/logs/access.www.yohobuy.com.log fenxi; | ||
848 | + proxy_redirect off; | ||
849 | + proxy_pass http://yohobuy-old-huodong; | ||
850 | + proxy_set_header Host $host; | ||
851 | + proxy_set_header X-Real-IP $remote_addr; | ||
852 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
853 | + proxy_set_header Accept-Encoding "gzip"; | ||
854 | + } | ||
855 | + | ||
856 | + location ~* \.(ico|woff|svg|eot|ttf|otf)$ { | ||
857 | + expires 30d; | ||
858 | + } | ||
859 | + location =/crossdomain.xml { | ||
860 | + expires 30d; | ||
861 | + } | ||
862 | + location =/sitemap.xml { | ||
863 | + expires 1d; | ||
864 | + } | ||
865 | + location =/robots.txt { | ||
866 | + expires 1d; | ||
867 | + } | ||
868 | +} | ||
869 | + | ||
870 | +server | ||
871 | +{ | ||
872 | + listen 80; | ||
873 | + server_name shop.yohobuy.com; | ||
874 | + location / { | ||
875 | + root /Data/PE/yohobuy_pc/yohobuy/www.yohobuy.com/public; | ||
876 | + index index.php; | ||
877 | + proxy_redirect off; | ||
878 | + proxy_pass http://yohobuy-pc; | ||
879 | + proxy_set_header Host $host; | ||
880 | + proxy_set_header X-Real-IP $remote_addr; | ||
881 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
882 | + proxy_set_header Accept-Encoding "gzip"; | ||
883 | + } | ||
884 | +} | ||
885 | + | ||
886 | +server | ||
887 | +{ | ||
888 | + listen 80; | ||
889 | + server_name yohobuy.com; | ||
890 | + | ||
891 | + location = / { | ||
892 | + return 301 http://www.yohobuy.com/; | ||
893 | + } | ||
894 | +} |
script/server/nginx/test/nginx.conf
0 → 100644
1 | +user www www; | ||
2 | + | ||
3 | +worker_processes 8; | ||
4 | + | ||
5 | +pid /Data/local/nginx-1.8.0/logs/nginx.pid; | ||
6 | +# [ debug | info | notice | warn | error | crit ] | ||
7 | +error_log /Data/logs/nginx/nginx_error.log; | ||
8 | +#error_log /dev/null; | ||
9 | +#Specifies the value for maximum file descriptors that can be opened by this process. | ||
10 | +worker_rlimit_nofile 51200; | ||
11 | + | ||
12 | +events | ||
13 | +{ | ||
14 | + use epoll; | ||
15 | + | ||
16 | + #maxclient = worker_processes * worker_connections / cpu_number | ||
17 | + worker_connections 51200; | ||
18 | +} | ||
19 | + | ||
20 | +http | ||
21 | +{ | ||
22 | + include /Data/local/nginx-1.8.0/conf/mime.types; | ||
23 | + default_type application/octet-stream; | ||
24 | + #charset gb2312,utf-8; | ||
25 | + charset utf-8; | ||
26 | + | ||
27 | + log_format main '$remote_addr - $remote_user [$time_local] $request $request_body ' | ||
28 | + '"$status" $body_bytes_sent "$http_referer" ' | ||
29 | + '"$http_user_agent" "$http_x_forwarded_for" "$request_time"'; | ||
30 | + log_format uic_log_flag '$remote_addr - [$time_local] - $request_uri'; | ||
31 | + # access_log /log/access.log main; | ||
32 | + #access_log /Data/logs/access_yohobuy.com.log main; | ||
33 | + | ||
34 | + #error_page 502 =200 /.busy.jpg; | ||
35 | + | ||
36 | + #error_page 403 = http://www.baidu.com; | ||
37 | + #error_page 404 = http://www.baidu.com; | ||
38 | + #General Options | ||
39 | + server_names_hash_bucket_size 128; | ||
40 | + client_header_buffer_size 32k; | ||
41 | + large_client_header_buffers 4 32k; | ||
42 | + client_body_buffer_size 8m; #256k | ||
43 | + # | ||
44 | + #server_tokens off; | ||
45 | + ignore_invalid_headers on; | ||
46 | + recursive_error_pages on; | ||
47 | + server_name_in_redirect off; | ||
48 | + | ||
49 | + sendfile on; | ||
50 | + | ||
51 | + #timeouts | ||
52 | + keepalive_timeout 60; | ||
53 | + #test | ||
54 | + #client_body_timeout 3m; | ||
55 | + #client_header_timeout 3m; | ||
56 | + #send_timeout 3m; | ||
57 | + | ||
58 | + | ||
59 | + #TCP Options | ||
60 | + tcp_nopush on; | ||
61 | + tcp_nodelay on; | ||
62 | + | ||
63 | + #fastcgi options | ||
64 | + fastcgi_connect_timeout 300; | ||
65 | + fastcgi_send_timeout 300; | ||
66 | + fastcgi_read_timeout 300; | ||
67 | + fastcgi_buffer_size 64k; | ||
68 | + fastcgi_buffers 4 64k; | ||
69 | + fastcgi_busy_buffers_size 128k; | ||
70 | + fastcgi_temp_file_write_size 128k; | ||
71 | + | ||
72 | + fastcgi_intercept_errors on; | ||
73 | + | ||
74 | + #set_real_ip_from 10.159.191.0/24; | ||
75 | + real_ip_header X-Forwarded-For; | ||
76 | + | ||
77 | + #hiden php version | ||
78 | + fastcgi_hide_header X-Powered-By; | ||
79 | + | ||
80 | + #size limits | ||
81 | + client_max_body_size 50m; | ||
82 | + | ||
83 | + gzip on; | ||
84 | + gzip_min_length 1k; | ||
85 | + gzip_buffers 4 16k; | ||
86 | + gzip_http_version 1.0; | ||
87 | + gzip_comp_level 2; | ||
88 | + gzip_types text/plain application/x-javascript text/css application/xml; | ||
89 | + gzip_vary on; | ||
90 | + | ||
91 | + #proxy_temp_path /dev/shm/proxy_temp; | ||
92 | + proxy_temp_path /Data/local/nginx-1.8.0/ngx_temp_dir; | ||
93 | + proxy_cache_path /Data/local/nginx-1.8.0/ngx_cache levels=1:2 keys_zone=cache_one:500m inactive=1d max_size=10g; | ||
94 | + proxy_connect_timeout 5; | ||
95 | + proxy_read_timeout 60; | ||
96 | + proxy_send_timeout 5; | ||
97 | + proxy_buffer_size 16k; | ||
98 | + proxy_buffers 4 64k; | ||
99 | + proxy_busy_buffers_size 128k; | ||
100 | + proxy_temp_file_write_size 128k; | ||
101 | + | ||
102 | + fastcgi_temp_path /dev/shm/fastcgi_temp; | ||
103 | + client_body_temp_path /dev/shm/client_body_temp; | ||
104 | + | ||
105 | + upstream yohobuy { | ||
106 | + server 127.0.0.1:6060 weight=6 max_fails=2 fail_timeout=10s; | ||
107 | + } | ||
108 | + | ||
109 | + upstream yohobuy_node { | ||
110 | + server 192.168.102.168:6002 weight=6 max_fails=2 fail_timeout=10s; | ||
111 | + } | ||
112 | + | ||
113 | + upstream oldservice { | ||
114 | + # ip_hash; | ||
115 | + server 192.168.50.69; | ||
116 | + } | ||
117 | + | ||
118 | + upstream unionapi{ | ||
119 | + server 192.168.102.211:8088; | ||
120 | + } | ||
121 | + | ||
122 | + | ||
123 | + #upstream | ||
124 | + fastcgi_next_upstream error timeout invalid_header http_500; | ||
125 | + | ||
126 | + #limit_zone limit $binary_remote_addr 1m; | ||
127 | + limit_req_zone $binary_remote_addr zone=one:50m rate=100r/s; | ||
128 | + limit_req_zone $binary_remote_addr zone=new:30m rate=50r/s; | ||
129 | + | ||
130 | + #fastcgi cache | ||
131 | + #fastcgi_cache_path /nginxcache levels=1:2 keys_zone=two:10m inactive=1d max_size=3000m; | ||
132 | + #for example just for study! have fun! | ||
133 | + include vhosts/test.yohobuy.conf; | ||
134 | + include vhosts/test.yohoact.conf; | ||
135 | + include vhosts/test.web.yohobuy.conf; | ||
136 | + | ||
137 | +} | ||
138 | + |
1 | + | ||
2 | +server { | ||
3 | + listen 80; | ||
4 | + server_name huodong.yohobuy.com; | ||
5 | + error_log /Data/logs/error.huodong.test.yoho.cn.log warn; | ||
6 | + | ||
7 | + root /Data/code/git/web/yohobuy/yohobuy/huodong.yohobuy.com/public; | ||
8 | + | ||
9 | + location ~* \.(ico|woff)$ { | ||
10 | + expires 7d; | ||
11 | + } | ||
12 | + | ||
13 | + location = /crossdomain.xml { | ||
14 | + expires 7d; | ||
15 | + } | ||
16 | + | ||
17 | + location / { | ||
18 | + proxy_redirect off; | ||
19 | + proxy_pass http://yohobuy; | ||
20 | + proxy_set_header Host $host; | ||
21 | + proxy_set_header X-Real-IP $remote_addr; | ||
22 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
23 | + proxy_set_header Accept-Encoding "gzip"; | ||
24 | + } | ||
25 | + | ||
26 | +} | ||
27 | + | ||
28 | +server | ||
29 | +{ | ||
30 | + listen 80; | ||
31 | + server_name www.yohobuy.com yohobuy.com; | ||
32 | + | ||
33 | + #access_log /Data/logs/access.buy.test.yoho.cn.log combined; | ||
34 | + error_log /Data/logs/nginx/error.yohobuy.com.log warn; | ||
35 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | ||
36 | + include vhosts/test.redirect_index.conf; | ||
37 | + | ||
38 | + error_page 404 = /error.html; | ||
39 | + | ||
40 | + location ~* \.(ico|woff)$ { | ||
41 | + expires 7d; | ||
42 | + } | ||
43 | + | ||
44 | + location = /crossdomain.xml { | ||
45 | + expires 7d; | ||
46 | + } | ||
47 | + location /log { | ||
48 | + # rewrite /log "http://${boy}_${girl}_${idx}"; | ||
49 | + } | ||
50 | + location = /error/test { | ||
51 | + proxy_redirect off; | ||
52 | + proxy_pass http://yohobuy; | ||
53 | + proxy_set_header Host $host; | ||
54 | + proxy_set_header X-Real-IP $remote_addr; | ||
55 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
56 | + proxy_set_header Accept-Encoding "gzip"; | ||
57 | + } | ||
58 | + | ||
59 | + location ^~ /yohounion/ { | ||
60 | + proxy_redirect off; | ||
61 | + proxy_pass http://unionapi/union/; | ||
62 | + proxy_set_header Host $host; | ||
63 | + proxy_set_header X-Real-IP $remote_addr; | ||
64 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
65 | + proxy_set_header Accept-Encoding "gzip"; | ||
66 | + } | ||
67 | + | ||
68 | + location ^~ /union/ClickUnionRest/ { | ||
69 | + proxy_redirect off; | ||
70 | + proxy_pass http://unionapi/union/ClickUnionRest/; | ||
71 | + proxy_set_header Host $host; | ||
72 | + proxy_set_header X-Real-IP $remote_addr; | ||
73 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
74 | + proxy_set_header Accept-Encoding "gzip"; | ||
75 | + } | ||
76 | + | ||
77 | + location = / { | ||
78 | + proxy_redirect off; | ||
79 | + proxy_pass http://yohobuy; | ||
80 | + proxy_set_header Host $host; | ||
81 | + proxy_set_header X-Real-IP $remote_addr; | ||
82 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
83 | + proxy_set_header Accept-Encoding "gzip"; | ||
84 | + } | ||
85 | + | ||
86 | + location = /reg.html { | ||
87 | + proxy_redirect off; | ||
88 | + proxy_pass http://yohobuy; | ||
89 | + proxy_set_header Host $host; | ||
90 | + proxy_set_header X-Real-IP $remote_addr; | ||
91 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
92 | + proxy_set_header Accept-Encoding "gzip"; | ||
93 | + } | ||
94 | + location = /index.html { | ||
95 | + proxy_redirect off; | ||
96 | + proxy_pass http://yohobuy; | ||
97 | + proxy_set_header Host $host; | ||
98 | + proxy_set_header X-Real-IP $remote_addr; | ||
99 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
100 | + proxy_set_header Accept-Encoding "gzip"; | ||
101 | + } | ||
102 | + location = /signin.html { | ||
103 | + proxy_redirect off; | ||
104 | + proxy_pass http://yohobuy; | ||
105 | + proxy_set_header Host $host; | ||
106 | + proxy_set_header X-Real-IP $remote_addr; | ||
107 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
108 | + proxy_set_header Accept-Encoding "gzip"; | ||
109 | + } | ||
110 | + location = /logout.html { | ||
111 | + proxy_redirect off; | ||
112 | + proxy_pass http://yohobuy; | ||
113 | + proxy_set_header Host $host; | ||
114 | + proxy_set_header X-Real-IP $remote_addr; | ||
115 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
116 | + proxy_set_header Accept-Encoding "gzip"; | ||
117 | + } | ||
118 | + | ||
119 | + location /common { | ||
120 | + proxy_redirect off; | ||
121 | + proxy_pass http://yohobuy; | ||
122 | + proxy_set_header Host $host; | ||
123 | + proxy_set_header X-Real-IP $remote_addr; | ||
124 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
125 | + proxy_set_header Accept-Encoding "gzip"; | ||
126 | + } | ||
127 | + location /passport { | ||
128 | + proxy_redirect off; | ||
129 | + proxy_pass http://yohobuy; | ||
130 | + proxy_set_header Host $host; | ||
131 | + proxy_set_header X-Real-IP $remote_addr; | ||
132 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
133 | + proxy_set_header Accept-Encoding "gzip"; | ||
134 | + } | ||
135 | + location /tools { | ||
136 | + proxy_redirect off; | ||
137 | + proxy_pass http://yohobuy; | ||
138 | + proxy_set_header Host $host; | ||
139 | + proxy_set_header X-Real-IP $remote_addr; | ||
140 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
141 | + proxy_set_header Accept-Encoding "gzip"; | ||
142 | + } | ||
143 | + location /brands { | ||
144 | + proxy_redirect off; | ||
145 | + proxy_pass http://yohobuy; | ||
146 | + proxy_set_header Host $host; | ||
147 | + proxy_set_header X-Real-IP $remote_addr; | ||
148 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
149 | + proxy_set_header Accept-Encoding "gzip"; | ||
150 | + } | ||
151 | + location = /home/address { | ||
152 | + proxy_redirect off; | ||
153 | + proxy_pass http://yohobuy; | ||
154 | + proxy_set_header Host $host; | ||
155 | + proxy_set_header X-Real-IP $remote_addr; | ||
156 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
157 | + proxy_set_header Accept-Encoding "gzip"; | ||
158 | + | ||
159 | + } | ||
160 | + location /home/favorite { | ||
161 | + proxy_redirect off; | ||
162 | + proxy_pass http://yohobuy; | ||
163 | + proxy_set_header Host $host; | ||
164 | + proxy_set_header X-Real-IP $remote_addr; | ||
165 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
166 | + proxy_set_header Accept-Encoding "gzip"; | ||
167 | + | ||
168 | + } | ||
169 | + location = /home/vip { | ||
170 | + proxy_redirect off; | ||
171 | + proxy_pass http://yohobuy; | ||
172 | + proxy_set_header Host $host; | ||
173 | + proxy_set_header X-Real-IP $remote_addr; | ||
174 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
175 | + proxy_set_header Accept-Encoding "gzip"; | ||
176 | + | ||
177 | + } | ||
178 | + location ~* /home/user { | ||
179 | + proxy_redirect off; | ||
180 | + proxy_pass http://yohobuy; | ||
181 | + proxy_set_header Host $host; | ||
182 | + proxy_set_header X-Real-IP $remote_addr; | ||
183 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
184 | + proxy_set_header Accept-Encoding "gzip"; | ||
185 | + | ||
186 | + } | ||
187 | + location /home/returns { | ||
188 | + proxy_redirect off; | ||
189 | + proxy_pass http://yohobuy; | ||
190 | + proxy_set_header Host $host; | ||
191 | + proxy_set_header X-Real-IP $remote_addr; | ||
192 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
193 | + proxy_set_header Accept-Encoding "gzip"; | ||
194 | + } | ||
195 | + location = /shopping/cart { | ||
196 | + proxy_redirect off; | ||
197 | + proxy_pass http://yohobuy; | ||
198 | + proxy_set_header Host $host; | ||
199 | + proxy_set_header X-Real-IP $remote_addr; | ||
200 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
201 | + proxy_set_header Accept-Encoding "gzip"; | ||
202 | + } | ||
203 | + location /cart/index { | ||
204 | + proxy_redirect off; | ||
205 | + proxy_pass http://yohobuy; | ||
206 | + proxy_set_header Host $host; | ||
207 | + proxy_set_header X-Real-IP $remote_addr; | ||
208 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
209 | + proxy_set_header Accept-Encoding "gzip"; | ||
210 | + } | ||
211 | + location ~* /home/edituserlikebrand { | ||
212 | + proxy_redirect off; | ||
213 | + proxy_pass http://yohobuy; | ||
214 | + proxy_set_header Host $host; | ||
215 | + proxy_set_header X-Real-IP $remote_addr; | ||
216 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
217 | + proxy_set_header Accept-Encoding "gzip"; | ||
218 | + } | ||
219 | + location ~* /home/isbrandname { | ||
220 | + proxy_redirect off; | ||
221 | + proxy_pass http://yohobuy; | ||
222 | + proxy_set_header Host $host; | ||
223 | + proxy_set_header X-Real-IP $remote_addr; | ||
224 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
225 | + proxy_set_header Accept-Encoding "gzip"; | ||
226 | + } | ||
227 | + location ~* /home/edituserhabitsinfo { | ||
228 | + proxy_redirect off; | ||
229 | + proxy_pass http://yohobuy; | ||
230 | + proxy_set_header Host $host; | ||
231 | + proxy_set_header X-Real-IP $remote_addr; | ||
232 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
233 | + proxy_set_header Accept-Encoding "gzip"; | ||
234 | + } | ||
235 | + location ~* /home/editusercontactinfo { | ||
236 | + proxy_redirect off; | ||
237 | + proxy_pass http://yohobuy; | ||
238 | + proxy_set_header Host $host; | ||
239 | + proxy_set_header X-Real-IP $remote_addr; | ||
240 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
241 | + proxy_set_header Accept-Encoding "gzip"; | ||
242 | + } | ||
243 | + location ~* /home/getprovicecityinfo { | ||
244 | + proxy_redirect off; | ||
245 | + proxy_pass http://yohobuy; | ||
246 | + proxy_set_header Host $host; | ||
247 | + proxy_set_header X-Real-IP $remote_addr; | ||
248 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
249 | + proxy_set_header Accept-Encoding "gzip"; | ||
250 | + } | ||
251 | + location ~* /home/edituserinfo { | ||
252 | + proxy_redirect off; | ||
253 | + proxy_pass http://yohobuy; | ||
254 | + proxy_set_header Host $host; | ||
255 | + proxy_set_header X-Real-IP $remote_addr; | ||
256 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
257 | + proxy_set_header Accept-Encoding "gzip"; | ||
258 | + } | ||
259 | + location ~* /home/address/deladdress { | ||
260 | + proxy_redirect off; | ||
261 | + proxy_pass http://yohobuy; | ||
262 | + proxy_set_header Host $host; | ||
263 | + proxy_set_header X-Real-IP $remote_addr; | ||
264 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
265 | + proxy_set_header Accept-Encoding "gzip"; | ||
266 | + } | ||
267 | + location ~* /home/address/saveaddress { | ||
268 | + proxy_redirect off; | ||
269 | + proxy_pass http://yohobuy; | ||
270 | + proxy_set_header Host $host; | ||
271 | + proxy_set_header X-Real-IP $remote_addr; | ||
272 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
273 | + proxy_set_header Accept-Encoding "gzip"; | ||
274 | + } | ||
275 | + location ~* /home/address/editaddress { | ||
276 | + proxy_redirect off; | ||
277 | + proxy_pass http://yohobuy; | ||
278 | + proxy_set_header Host $host; | ||
279 | + proxy_set_header X-Real-IP $remote_addr; | ||
280 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
281 | + proxy_set_header Accept-Encoding "gzip"; | ||
282 | + } | ||
283 | + location ~* /home/address/area { | ||
284 | + proxy_redirect off; | ||
285 | + proxy_pass http://yohobuy; | ||
286 | + proxy_set_header Host $host; | ||
287 | + proxy_set_header X-Real-IP $remote_addr; | ||
288 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
289 | + proxy_set_header Accept-Encoding "gzip"; | ||
290 | + } | ||
291 | + location = /home { | ||
292 | + proxy_redirect off; | ||
293 | + proxy_pass http://yohobuy; | ||
294 | + proxy_set_header Host $host; | ||
295 | + proxy_set_header X-Real-IP $remote_addr; | ||
296 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
297 | + proxy_set_header Accept-Encoding "gzip"; | ||
298 | + } | ||
299 | + location ~* /home/address/defaultAddress { | ||
300 | + proxy_redirect off; | ||
301 | + proxy_pass http://yohobuy; | ||
302 | + proxy_set_header Host $host; | ||
303 | + proxy_set_header X-Real-IP $remote_addr; | ||
304 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
305 | + proxy_set_header Accept-Encoding "gzip"; | ||
306 | + } | ||
307 | + location ~* /home/exchange/detail { | ||
308 | + proxy_redirect off; | ||
309 | + proxy_pass http://yohobuy; | ||
310 | + proxy_set_header Host $host; | ||
311 | + proxy_set_header X-Real-IP $remote_addr; | ||
312 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
313 | + proxy_set_header Accept-Encoding "gzip"; | ||
314 | + } | ||
315 | + location ~* /home/refund/detail { | ||
316 | + proxy_redirect off; | ||
317 | + proxy_pass http://yohobuy; | ||
318 | + proxy_set_header Host $host; | ||
319 | + proxy_set_header X-Real-IP $remote_addr; | ||
320 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
321 | + proxy_set_header Accept-Encoding "gzip"; | ||
322 | + } | ||
323 | + location ^~ /product/item/togglecollect { | ||
324 | + proxy_redirect off; | ||
325 | + proxy_pass http://yohobuy; | ||
326 | + proxy_set_header Host $host; | ||
327 | + proxy_set_header X-Real-IP $remote_addr; | ||
328 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
329 | + proxy_set_header Accept-Encoding "gzip"; | ||
330 | + } | ||
331 | + | ||
332 | + location /home/orders { | ||
333 | + proxy_redirect off; | ||
334 | + proxy_pass http://yohobuy; | ||
335 | + proxy_set_header Host $host; | ||
336 | + proxy_set_header X-Real-IP $remote_addr; | ||
337 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
338 | + proxy_set_header Accept-Encoding "gzip"; | ||
339 | + } | ||
340 | + location /home/account { | ||
341 | + proxy_redirect off; | ||
342 | + proxy_pass http://yohobuy; | ||
343 | + proxy_set_header Host $host; | ||
344 | + proxy_set_header X-Real-IP $remote_addr; | ||
345 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
346 | + proxy_set_header Accept-Encoding "gzip"; | ||
347 | + } | ||
348 | + location /home/consult { | ||
349 | + proxy_redirect off; | ||
350 | + proxy_pass http://yohobuy; | ||
351 | + proxy_set_header Host $host; | ||
352 | + proxy_set_header X-Real-IP $remote_addr; | ||
353 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
354 | + proxy_set_header Accept-Encoding "gzip"; | ||
355 | + } | ||
356 | + location /home/redenvelopes { | ||
357 | + proxy_redirect off; | ||
358 | + proxy_pass http://yohobuy; | ||
359 | + proxy_set_header Host $host; | ||
360 | + proxy_set_header X-Real-IP $remote_addr; | ||
361 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
362 | + proxy_set_header Accept-Encoding "gzip"; | ||
363 | + } | ||
364 | + | ||
365 | + location /home/currency { | ||
366 | + proxy_redirect off; | ||
367 | + proxy_pass http://yohobuy; | ||
368 | + proxy_set_header Host $host; | ||
369 | + proxy_set_header X-Real-IP $remote_addr; | ||
370 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
371 | + proxy_set_header Accept-Encoding "gzip"; | ||
372 | + } | ||
373 | + | ||
374 | + location /home/coupons { | ||
375 | + proxy_redirect off; | ||
376 | + proxy_pass http://yohobuy; | ||
377 | + proxy_set_header Host $host; | ||
378 | + proxy_set_header X-Real-IP $remote_addr; | ||
379 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
380 | + proxy_set_header Accept-Encoding "gzip"; | ||
381 | + } | ||
382 | + location /home/complaints { | ||
383 | + proxy_redirect off; | ||
384 | + proxy_pass http://yohobuy; | ||
385 | + proxy_set_header Host $host; | ||
386 | + proxy_set_header X-Real-IP $remote_addr; | ||
387 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
388 | + proxy_set_header Accept-Encoding "gzip"; | ||
389 | + } | ||
390 | + location /home/gift { | ||
391 | + proxy_redirect off; | ||
392 | + proxy_pass http://yohobuy; | ||
393 | + proxy_set_header Host $host; | ||
394 | + proxy_set_header X-Real-IP $remote_addr; | ||
395 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
396 | + proxy_set_header Accept-Encoding "gzip"; | ||
397 | + } | ||
398 | + location /home/message { | ||
399 | + proxy_redirect off; | ||
400 | + proxy_pass http://yohobuy; | ||
401 | + proxy_set_header Host $host; | ||
402 | + proxy_set_header X-Real-IP $remote_addr; | ||
403 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
404 | + proxy_set_header Accept-Encoding "gzip"; | ||
405 | + } | ||
406 | + location /index/guide { | ||
407 | + proxy_redirect off; | ||
408 | + proxy_pass http://yohobuy; | ||
409 | + proxy_set_header Host $host; | ||
410 | + proxy_set_header X-Real-IP $remote_addr; | ||
411 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
412 | + proxy_set_header Accept-Encoding "gzip"; | ||
413 | + } | ||
414 | + | ||
415 | + location /help { | ||
416 | + proxy_redirect off; | ||
417 | + proxy_pass http://yohobuy; | ||
418 | + proxy_set_header Host $host; | ||
419 | + proxy_set_header X-Real-IP $remote_addr; | ||
420 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
421 | + proxy_set_header Accept-Encoding "gzip"; | ||
422 | + } | ||
423 | + location /coupon { | ||
424 | + proxy_redirect off; | ||
425 | + proxy_pass http://yohobuy; | ||
426 | + proxy_set_header Host $host; | ||
427 | + proxy_set_header X-Real-IP $remote_addr; | ||
428 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
429 | + proxy_set_header Accept-Encoding "gzip"; | ||
430 | + } | ||
431 | + location ^~ /product/show_ { | ||
432 | + proxy_redirect off; | ||
433 | + proxy_pass http://yohobuy; | ||
434 | + proxy_set_header Host $host; | ||
435 | + proxy_set_header X-Real-IP $remote_addr; | ||
436 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
437 | + proxy_set_header Accept-Encoding "gzip"; | ||
438 | + } | ||
439 | + | ||
440 | + location ^~ /pay { | ||
441 | + proxy_redirect off; | ||
442 | + proxy_pass http://yohobuy; | ||
443 | + proxy_set_header Host $host; | ||
444 | + proxy_set_header X-Real-IP $remote_addr; | ||
445 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
446 | + proxy_set_header Accept-Encoding "gzip"; | ||
447 | + } | ||
448 | + location ^~ /shopping/pay { | ||
449 | + | ||
450 | + proxy_pass http://yohobuy; | ||
451 | + proxy_set_header Host $host; | ||
452 | + proxy_set_header X-Real-IP $remote_addr; | ||
453 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
454 | + proxy_set_header Accept-Encoding "gzip"; | ||
455 | + } | ||
456 | + location ^~ /home/comment { | ||
457 | + proxy_redirect off; | ||
458 | + proxy_pass http://yohobuy; | ||
459 | + proxy_set_header Host $host; | ||
460 | + proxy_set_header X-Real-IP $remote_addr; | ||
461 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
462 | + proxy_set_header Accept-Encoding "gzip"; | ||
463 | + } | ||
464 | + location ^~ /contact.html { | ||
465 | + proxy_redirect off; | ||
466 | + proxy_pass http://yohobuy; | ||
467 | + proxy_set_header Host $host; | ||
468 | + proxy_set_header X-Real-IP $remote_addr; | ||
469 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
470 | + proxy_set_header Accept-Encoding "gzip"; | ||
471 | + } | ||
472 | + location ^~ /yohobuy.html { | ||
473 | + proxy_redirect off; | ||
474 | + proxy_pass http://yohobuy; | ||
475 | + proxy_set_header Host $host; | ||
476 | + proxy_set_header X-Real-IP $remote_addr; | ||
477 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
478 | + proxy_set_header Accept-Encoding "gzip"; | ||
479 | + } | ||
480 | + location ^~ /newpower.html { | ||
481 | + proxy_redirect off; | ||
482 | + proxy_pass http://yohobuy; | ||
483 | + proxy_set_header Host $host; | ||
484 | + proxy_set_header X-Real-IP $remote_addr; | ||
485 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
486 | + proxy_set_header Accept-Encoding "gzip"; | ||
487 | + } | ||
488 | + location ^~ /privacy.html { | ||
489 | + proxy_redirect off; | ||
490 | + proxy_pass http://yohobuy; | ||
491 | + proxy_set_header Host $host; | ||
492 | + proxy_set_header X-Real-IP $remote_addr; | ||
493 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
494 | + proxy_set_header Accept-Encoding "gzip"; | ||
495 | + } | ||
496 | + location ^~ /link.html { | ||
497 | + proxy_redirect off; | ||
498 | + proxy_pass http://yohobuy; | ||
499 | + proxy_set_header Host $host; | ||
500 | + proxy_set_header X-Real-IP $remote_addr; | ||
501 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
502 | + proxy_set_header Accept-Encoding "gzip"; | ||
503 | + } | ||
504 | + location ^~ /download/app { | ||
505 | + proxy_redirect off; | ||
506 | + proxy_pass http://yohobuy; | ||
507 | + proxy_set_header Host $host; | ||
508 | + proxy_set_header X-Real-IP $remote_addr; | ||
509 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
510 | + proxy_set_header Accept-Encoding "gzip"; | ||
511 | + } | ||
512 | + | ||
513 | + location ^~ /product/intro_ { | ||
514 | + rewrite ^/product/pro_(\d+)_(\d+)/(.+)$ http://item.yohobuy.com/product/pro_$1_$2/$3; | ||
515 | + } | ||
516 | + location /product/new { | ||
517 | + rewrite ^/product/new(.*)$ http://list.yohobuy.com/new$1 permanent; | ||
518 | + } | ||
519 | + location /woman { | ||
520 | + rewrite ^/woman(.*)$ http://new.yohobuy.com/girls$1 permanent; | ||
521 | + } | ||
522 | + location /sale { | ||
523 | + rewrite ^/sale(.*)$ http://list.yohobuy.com/sale$1 permanent; | ||
524 | + } | ||
525 | + location /respond { | ||
526 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public/; | ||
527 | + } | ||
528 | + location ^~ /logout_ { | ||
529 | + rewrite ^/logout_(.+).html http://www.yohobuy.com/logout.html?token=$1; | ||
530 | + } | ||
531 | + location = /logout_.html { | ||
532 | + rewrite ^/logout_(.+) http://www.yohobuy.com/logout.html?token=$1; | ||
533 | + } | ||
534 | + location ^~ /special { | ||
535 | + proxy_redirect off; | ||
536 | + proxy_pass http://yohobuy_node; | ||
537 | + proxy_set_header Host $host; | ||
538 | + proxy_set_header X-Real-IP $remote_addr; | ||
539 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
540 | + proxy_set_header Accept-Encoding "gzip"; | ||
541 | + } | ||
542 | + location / { | ||
543 | + access_log /Data/logs/access.oldbuy.www.yohobuy.com.log combined; | ||
544 | + proxy_redirect off; | ||
545 | + proxy_pass http://192.168.50.69; | ||
546 | + proxy_set_header Host www.yohobuy.com; | ||
547 | + proxy_set_header X-Real-IP $remote_addr; | ||
548 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
549 | + proxy_set_header Accept-Encoding "gzip"; | ||
550 | + } | ||
551 | +} | ||
552 | + | ||
553 | +server | ||
554 | +{ | ||
555 | + listen 80; | ||
556 | + server_name item.yohobuy.com; | ||
557 | + location / { | ||
558 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | ||
559 | + index index.php; | ||
560 | + proxy_redirect off; | ||
561 | + proxy_pass http://yohobuy; | ||
562 | + proxy_set_header Host $host; | ||
563 | + proxy_set_header X-Real-IP $remote_addr; | ||
564 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
565 | + proxy_set_header Accept-Encoding "gzip"; | ||
566 | + } | ||
567 | +} | ||
568 | +server | ||
569 | +{ | ||
570 | + listen 80; | ||
571 | + server_name guang.yohobuy.com; | ||
572 | + location / { | ||
573 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | ||
574 | + index index.php; | ||
575 | + proxy_redirect off; | ||
576 | + proxy_pass http://yohobuy; | ||
577 | + proxy_set_header Host $host; | ||
578 | + proxy_set_header X-Real-IP $remote_addr; | ||
579 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
580 | + proxy_set_header Accept-Encoding "gzip"; | ||
581 | + } | ||
582 | +} | ||
583 | +server | ||
584 | +{ | ||
585 | + listen 80; | ||
586 | + server_name *.yohobuy.com sale.yohobuy.com; | ||
587 | + | ||
588 | + #access_log /Data/logs/access.buy.test.yoho.cn.log combined; | ||
589 | + error_log /Data/logs/nginx/error.yohobuy.com.log warn; | ||
590 | + | ||
591 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | ||
592 | + | ||
593 | + location ~* \.(ico|woff)$ { | ||
594 | + expires 7d; | ||
595 | + } | ||
596 | + | ||
597 | + location = /crossdomain.xml { | ||
598 | + expires 7d; | ||
599 | + } | ||
600 | + location /hotrank { | ||
601 | + proxy_redirect off; | ||
602 | + proxy_pass http://yohobuy; | ||
603 | + proxy_set_header Host $host; | ||
604 | + proxy_set_header X-Real-IP $remote_addr; | ||
605 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
606 | + proxy_set_header Accept-Encoding "gzip"; | ||
607 | + } | ||
608 | + location = /error/test { | ||
609 | + proxy_redirect off; | ||
610 | + proxy_pass http://yohobuy; | ||
611 | + proxy_set_header Host $host; | ||
612 | + proxy_set_header X-Real-IP $remote_addr; | ||
613 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
614 | + proxy_set_header Accept-Encoding "gzip"; | ||
615 | + } | ||
616 | + location /respond { | ||
617 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public/; | ||
618 | + } | ||
619 | + location / { | ||
620 | + root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | ||
621 | + index index.php; | ||
622 | + proxy_redirect off; | ||
623 | + proxy_pass http://yohobuy; | ||
624 | + proxy_set_header Host $host; | ||
625 | + proxy_set_header X-Real-IP $remote_addr; | ||
626 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
627 | + proxy_set_header Accept-Encoding "gzip"; | ||
628 | + } | ||
629 | +} | ||
630 | +server | ||
631 | + { | ||
632 | + listen 80; | ||
633 | + server_name testing.yohoops.org; | ||
634 | + location / { | ||
635 | + proxy_pass http://192.168.102.216:8080; | ||
636 | + proxy_redirect off; | ||
637 | + proxy_set_header X-Real-IP $remote_addr; | ||
638 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
639 | + | ||
640 | + } | ||
641 | + } | ||
642 | +server | ||
643 | +{ | ||
644 | + listen 80; | ||
645 | + server_name webstatic.dev.yohobuy.com; | ||
646 | + | ||
647 | + #access_log /Data/logs/nginx/access.static.m.yohobuy.com.log combined; | ||
648 | + #error_log /Data/logs/nginx/error.static.m.yohobuy.com.log warn; | ||
649 | + | ||
650 | + root /Data/code/git/web/yohobuy/web-static/dist; | ||
651 | + | ||
652 | + location / { | ||
653 | + log_not_found off; | ||
654 | + access_log off; | ||
655 | + expires 30d; | ||
656 | + } | ||
657 | + | ||
658 | + location ~* \.(svg|eot|ttf|woff|otf)$ { | ||
659 | + add_header Access-Control-Allow-Origin *; | ||
660 | + expires 30d; | ||
661 | + } | ||
662 | + | ||
663 | +} | ||
664 | + | ||
665 | +server | ||
666 | +{ | ||
667 | + listen 80; | ||
668 | + server_name huodong.static.yohobuy.com; | ||
669 | + | ||
670 | + #access_log /Data/logs/nginx/access.static.m.yohobuy.com.log combined; | ||
671 | + #error_log /Data/logs/nginx/error.static.m.yohobuy.com.log warn; | ||
672 | + | ||
673 | + root /Data/code/git/web/yohobuy/web-static; | ||
674 | + | ||
675 | + location / { | ||
676 | + log_not_found off; | ||
677 | + access_log off; | ||
678 | + expires 30d; | ||
679 | + } | ||
680 | + | ||
681 | + location ~* \.(svg|eot|ttf|woff|otf)$ { | ||
682 | + add_header Access-Control-Allow-Origin *; | ||
683 | + expires 30d; | ||
684 | + } | ||
685 | + | ||
686 | +} | ||
687 | + | ||
688 | + | ||
689 | +server | ||
690 | +{ | ||
691 | + listen 80; | ||
692 | + # listen 443 ssl; | ||
693 | + # ssl_certificate /Data/local/nginx-1.8.0/ssl/server.crt; | ||
694 | + # ssl_certificate_key /Data/local/nginx-1.8.0/ssl/server.key; | ||
695 | + server_name cdn.yoho.cn; | ||
696 | + | ||
697 | + # access_log /Data/logs/nginx/access.static.m.yohobuy.com.log combined; | ||
698 | + # error_log /Data/logs/nginx/error.static.m.yohobuy.com.log warn; | ||
699 | + | ||
700 | + root /Data/code/git/yohobuy/static/dist; | ||
701 | + | ||
702 | + #location / { | ||
703 | + # log_not_found off; | ||
704 | + # access_log off; | ||
705 | + # #expires 30d; | ||
706 | + #} | ||
707 | + | ||
708 | + location ~* \.(svg|eot|ttf|woff|otf)$ { | ||
709 | + add_header Access-Control-Allow-Origin *; | ||
710 | + expires 30d; | ||
711 | + } | ||
712 | + | ||
713 | + location ^~ /yohobuy/ { | ||
714 | + add_header Access-Control-Allow-Origin *; | ||
715 | + root /Data/code/git/web/yohobuy/web-static/dist/; | ||
716 | + } | ||
717 | + location / { | ||
718 | + expires 1d; | ||
719 | + } | ||
720 | + | ||
721 | +} |
-
Please register or login to post a comment