/
example1.conf
129 lines (129 loc) · 3.63 KB
/
example1.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
load_module modules/ngx_mail_module.so;
load_module modules/ngx_http_geoip_module.so;
daemon off;
debug_points abort;
error_log /tmp/error.log warn;
events {
accept_mutex on;
accept_mutex_delay 500ms;
debug_connection unix:;
multi_accept on;
worker_connections 1024;
}
http {
add_header X-Foo Bar always;
add_trailer X-Baz Qux;
default_type text/html;
fastcgi_intercept_errors off;
fastcgi_temp_file_write_size 1024k;
gzip 1000;
gzip_vary off;
if_modified_since exact;
index index.html index.php;
limit_rate 100k;
lingering_close on;
log_format mylogger escape=none '$remote_addr - $remote_user [$time_local]';
log_format jsonlogger escape=json '{"remote_addr":$remote_addr}';
log_not_found off;
map $http_host $loggable {
hostnames;
foobar barbaz;
barbaz 3;
}
map_hash_max_size 1m;
sendfile on;
server {
access_log /tmp/bar.log jsonlogger buffer=1024k gzip=9 flush=3h if=$loggable;
default_type foobar;
fastcgi_intercept_errors on;
fastcgi_store_access user:rwx group:rwx all:rwx;
gzip 500;
gzip_vary on;
index other.htm;
limit_rate 16k;
lingering_close off;
listen localhost;
listen foobar.com:420;
listen 8000;
listen /tmp/unix.sock;
listen dhall-lang.org:9001 setfib=1000 ipv6only=on;
location = / {
deny 10.11.12.13;
allow 10.11.12.0/24;
deny all;
add_header X-Country Sweden always;
add_trailer X-Continent Europe;
default_type text/html;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param HTTPS $https;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_pass unix:/tmp/fastcgi.socket;
gzip 200;
gzip_vary off;
index foobar.html;
internal;
limit_rate 4k;
lingering_close always;
log_not_found on;
log_subrequest on;
max_ranges 512;
try_files foo bar =404;
}
location ~* ^/users/(.+\.(?:gif|jpe?g|png))$ {
default_type foo;
fastcgi_intercept_errors on;
log_subrequest on;
max_ranges 512;
msie_padding off;
}
location @bar {
default_type bar;
log_subrequest off;
msie_padding on;
}
log_not_found off;
root /var/root;
satisfy all;
server_name hello.net there.com;
tcp_nodelay on;
try_files index.html test.php /foo;
}
types {
fruits apple banana;
}
upstream django {
ntlm;
server localhost fail_timeout=4m;
}
}
lock_file /tmp/lock.tmp;
master_process on;
pcre_jit on;
pid pidfile;
ssl_engine foossl;
timer_resolution 100ms;
user foo;
worker_aio_requests 3;
worker_cpu_affinity auto 0110;
worker_priority -10;
worker_processes 4;
worker_shutdown_timeout 10s;