Ticket #1459: nginx-reduced-test-case-vary.conf

File nginx-reduced-test-case-vary.conf, 5.2 KB (added by Neil Craig, 8 years ago)

reduced test case

Line 
1user gtmdaemon;
2worker_processes auto;
3worker_priority -15;
4worker_cpu_affinity auto;
5worker_rlimit_nofile 50000;
6
7events {
8 # worker_connections benefits from a large value in that it reduces error counts
9 worker_connections 20000;
10 multi_accept on;
11}
12
13http {
14 default_type text/plain;
15
16 proxy_redirect off;
17 proxy_http_version 1.1;
18 proxy_set_header Connection "";
19 proxy_headers_hash_max_size 4096;
20 proxy_buffers 64 4k;
21 proxy_buffer_size 16384;
22 proxy_headers_hash_bucket_size 1024;
23
24 gzip on;
25 gzip_comp_level 7;
26 gzip_proxied any;
27 gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json image/svg+xml;
28 log_format standard
29 '"$time_iso8601" '
30 '"$request_method" '
31 '"$scheme" '
32 '"$host" '
33 '"$server_protocol" '
34 '"$status" '
35 '"$bytes_sent" '
36 '"$http_referer" '
37 '"$http_user_agent" '
38 '"$request_time" '
39 '"$upstream_cache_status" '
40 '"$upstream_http_vary" '
41 '"$sent_http_cache_control" '
42 '"$upstream_response_length" '
43 '"$upstream_status" '
44 '"$ssl_cipher" '
45 '"$ssl_server_name" '
46 '"$ssl_session_reused" '
47 '"$tcpinfo_rtt" '
48 '"$upstream_connect_time" '
49 '"$upstream_response_time" '
50 '"$gzip_ratio" '
51 '"$request_id" '
52 '"$request_uri" '
53 '"$uri" '
54 '"$upstream_addr" ';
55
56 access_log /var/log/nginx/ruc-access.log standard;
57 error_log /var/log/nginx/ruc-error.log warn;
58
59 proxy_cache_path /mnt/ngx_cache_data levels=1:2 use_temp_path=off keys_zone=shared_cache:32m max_size=12288m;
60 ssl_session_cache shared:global_ssl_cache:128m;
61
62 # Generic/common server for listen port configs
63 server {
64 listen *:80 so_keepalive=120s:30s:20 reuseport bind default_server;
65 listen *:443 ssl http2 so_keepalive=120s:30s:20 reuseport bind default_server;
66 ssl_certificate /etc/nginx/current/tls/certs/default.crt;
67 ssl_certificate_key /etc/nginx/current/tls/private/default.key;
68
69 location / {
70 proxy_set_header "vvrh1" "$arg_vv1";
71 add_header "Edge-Cache-Status" "$upstream_cache_status" always;
72 add_header "Origin-Response-Status" "$upstream_status" always;
73 add_header "Origin-IP" "$upstream_addr";
74
75 proxy_cache_key $scheme://$host:$server_port;
76 proxy_cache_lock off;
77 proxy_cache_background_update on;
78 proxy_cache_methods GET HEAD;
79 proxy_cache_min_uses 0;
80 proxy_cache shared_cache;
81 proxy_cache_use_stale off;
82 proxy_cache_revalidate off;
83 proxy_pass http://127.0.0.1:9000;
84 }
85 }
86
87 #### server for vary testing
88 server {
89 listen 9000;
90 location / {
91 more_set_headers "Cache-control: public,max-age=30";
92 more_set_headers "Vary: vvrh1";
93 more_set_headers "vvrh1-val-rec: $http_vvrh1";
94 return 200 $time_iso8601;
95 }
96 }
97
98 # configuration file /etc/nginx/current/mime.types:
99 # Mime-type to file extension mappings
100 types {
101 text/html html htm shtml;
102 text/css css;
103 text/xml xml rss;
104 image/gif gif;
105 image/jpeg jpeg jpg;
106 application/x-javascript js;
107 text/plain txt;
108 text/x-component htc;
109 text/mathml mml;
110 image/png png;
111 image/x-icon ico;
112 image/x-jng jng;
113 image/vnd.wap.wbmp wbmp;
114 application/java-archive jar war ear;
115 application/mac-binhex40 hqx;
116 application/pdf pdf;
117 application/x-cocoa cco;
118 application/x-java-archive-diff jardiff;
119 application/x-java-jnlp-file jnlp;
120 application/x-makeself run;
121 application/x-perl pl pm;
122 application/x-pilot prc pdb;
123 application/x-rar-compressed rar;
124 application/x-redhat-package-manager rpm;
125 application/x-sea sea;
126 application/x-shockwave-flash swf;
127 application/x-stuffit sit;
128 application/x-tcl tcl tk;
129 application/x-x509-ca-cert der pem crt;
130 application/x-xpinstall xpi;
131 application/zip zip;
132 application/octet-stream deb;
133 application/octet-stream bin exe dll;
134 application/octet-stream dmg;
135 application/octet-stream eot;
136 application/octet-stream iso img;
137 application/octet-stream msi msp msm;
138 audio/mpeg mp3;
139 audio/x-realaudio ra;
140 video/mpeg mpeg mpg;
141 video/quicktime mov;
142 video/x-flv flv;
143 video/x-msvideo avi;
144 video/x-ms-wmv wmv;
145 video/x-ms-asf asx asf;
146 video/x-mng mng;
147 application/json json;
148 image/svg+xml svg;
149 }
150}