update
This commit is contained in:
parent
c50569d73e
commit
a624163120
27 changed files with 215 additions and 6 deletions
|
|
@ -35,6 +35,7 @@ $optionalSnippetConfig = @(
|
|||
""
|
||||
" location /fastcgi {"
|
||||
" include /etc/nginx/kit/fastcgi/hide-powered-by.conf;"
|
||||
" include /etc/nginx/kit/fastcgi/timeout-300.conf;"
|
||||
" }"
|
||||
""
|
||||
" location /proxy {"
|
||||
|
|
@ -46,6 +47,38 @@ $optionalSnippetConfig = @(
|
|||
|
||||
$optionalSnippetConfigShell = $optionalSnippetConfig -replace "`n", "\\n"
|
||||
|
||||
$advancedProxyConfig = @(
|
||||
"events {}"
|
||||
""
|
||||
"http {"
|
||||
" include /etc/nginx/mime.types;"
|
||||
" default_type application/octet-stream;"
|
||||
""
|
||||
" include /etc/nginx/kit/http/log-format-upstream.conf;"
|
||||
""
|
||||
" server {"
|
||||
" include /etc/nginx/kit/listen/http.conf;"
|
||||
" server_name streaming.example.com;"
|
||||
" access_log /var/log/nginx/streaming.access.log upstream_timing;"
|
||||
""
|
||||
" location /events/ {"
|
||||
" include /etc/nginx/kit/proxy_pass/forwarded.conf;"
|
||||
" include /etc/nginx/kit/proxy_pass/streaming.conf;"
|
||||
" include /etc/nginx/kit/proxy_pass/timeout-300.conf;"
|
||||
" proxy_pass http://127.0.0.1:9000;"
|
||||
" }"
|
||||
""
|
||||
" location /secure-upstream/ {"
|
||||
" include /etc/nginx/kit/proxy_pass/forwarded.conf;"
|
||||
" include /etc/nginx/kit/proxy_pass/https-upstream.conf;"
|
||||
" proxy_pass https://example.com;"
|
||||
" }"
|
||||
" }"
|
||||
"}"
|
||||
) -join "\n"
|
||||
|
||||
$advancedProxyConfigShell = $advancedProxyConfig -replace "`n", "\\n"
|
||||
|
||||
$modernHttp2Config = @(
|
||||
"events {}"
|
||||
""
|
||||
|
|
@ -79,6 +112,7 @@ $containerCommand = @(
|
|||
"cp /etc/nginx/kit/examples/reverse-proxy.nginx.conf /tmp/nginx-kit/examples/reverse-proxy.nginx.conf"
|
||||
"printf '%b' '$serverSnippetConfigShell' > /tmp/nginx-kit/server-snippet.nginx.conf"
|
||||
"printf '%b' '$optionalSnippetConfigShell' > /tmp/nginx-kit/optional-snippets.nginx.conf"
|
||||
"printf '%b' '$advancedProxyConfigShell' > /tmp/nginx-kit/advanced-proxy.nginx.conf"
|
||||
"printf '%b' '$modernHttp2ConfigShell' > /tmp/nginx-kit/modern-http2.nginx.conf"
|
||||
"echo 'Validating examples/example.com.conf'"
|
||||
"nginx -t -c /tmp/nginx-kit/server-snippet.nginx.conf"
|
||||
|
|
@ -86,6 +120,8 @@ $containerCommand = @(
|
|||
"nginx -t -c /tmp/nginx-kit/examples/reverse-proxy.nginx.conf"
|
||||
"echo 'Validating optional security and hide-powered-by snippets'"
|
||||
"nginx -t -c /tmp/nginx-kit/optional-snippets.nginx.conf"
|
||||
"echo 'Validating optional upstream logging, streaming, and HTTPS-upstream snippets'"
|
||||
"nginx -t -c /tmp/nginx-kit/advanced-proxy.nginx.conf"
|
||||
"echo 'Validating modern http2 on snippets'"
|
||||
"nginx -t -c /tmp/nginx-kit/modern-http2.nginx.conf"
|
||||
) -join "; "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue