-
Notifications
You must be signed in to change notification settings - Fork 12
/
30-ping.conf
63 lines (52 loc) · 1.76 KB
/
30-ping.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
# vim: set ft=nginx:
{{- $statsEnabled := default "false" .Env.STATS_ENABLED }}
location ^~ /-/ {
root /usr/local/docker/lib/php;
expires epoch;
add_header X-Accel-Expires 0;
{{- if (default "" .Env.STATS_PASSWORD) }}
auth_basic "Stats";
auth_basic_user_file /usr/local/docker/etc/stats.htpasswd;
{{- end }}
allow 127.0.0.1;
{{- if (default "10.0.0.0/8" .Env.STATS_WHITELIST_CIDR) }}
allow {{ default "10.0.0.0/8" .Env.STATS_WHITELIST_CIDR }};
{{- end }}
deny all;
satisfy any;
{{- if ne "off" ( default "/-/nginx-ping" .Env.NGINX_PING_PATH)}}
location = {{ default "/-/nginx-ping" .Env.NGINX_PING_PATH }} {
types { } default_type "text/plain";
return 200 'pong';
}
{{ end }}
{{- if ne "off" ( default "/-/nginx-status" .Env.NGINX_STATUS_PATH)}}
location = {{ default "/-/nginx-status" .Env.NGINX_STATUS_PATH }} {
stub_status on;
}
{{ end }}
{{- if ne "off" ( default "/-/php-ping" .Env.PHP_PING_PATH ) }}
location = {{ default "/-/php-ping" .Env.PHP_PING_PATH }} {
fastcgi_pass php;
fastcgi_index index.php;
include fastcgi.conf;
}
{{ end }}
{{- if ne "off" ( default "/-/php-status" .Env.PHP_STATUS_PATH ) }}
location = {{ default "/-/php-status" .Env.PHP_STATUS_PATH }} {
fastcgi_pass php;
fastcgi_index index.php;
include fastcgi.conf;
}
{{ end }}
{{- if isTrue $statsEnabled }}
{{- if ne "off" ( default "/-/php-info" .Env.PHP_INFO_PATH)}}
location = /-/php-info {
fastcgi_pass php;
fastcgi_index index.php;
include fastcgi.conf;
rewrite ^ /phpinfo.php break;
}
{{- end }}
{{- end }}
}