fix and update
This commit is contained in:
15
install.sh
15
install.sh
@@ -2536,10 +2536,11 @@ EOF
|
|||||||
write_nginx_site_docs() {
|
write_nginx_site_docs() {
|
||||||
local domain="$1"
|
local domain="$1"
|
||||||
local ssl_type="${2:-none}"
|
local ssl_type="${2:-none}"
|
||||||
local conf http_preamble ssl_block proxy_root
|
local conf http_preamble ssl_block proxy_root server_dns
|
||||||
conf="$(nginx_conf_target docs)"
|
conf="$(nginx_conf_target docs)"
|
||||||
proxy_root="$(render_proxy_root docs)"
|
proxy_root="$(render_proxy_root docs)"
|
||||||
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
||||||
|
server_dns="$(nginx_docker_server_dns_block)"
|
||||||
|
|
||||||
if [[ "$ssl_type" == "none" ]]; then
|
if [[ "$ssl_type" == "none" ]]; then
|
||||||
nginx_write_conf "$conf" <<EOF
|
nginx_write_conf "$conf" <<EOF
|
||||||
@@ -2547,6 +2548,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
|
${server_dns}
|
||||||
location = / { return 302 /docs; }
|
location = / { return 302 /docs; }
|
||||||
location / {
|
location / {
|
||||||
${proxy_root}
|
${proxy_root}
|
||||||
@@ -2563,6 +2565,7 @@ ${http_preamble}server {
|
|||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
${ssl_block}
|
${ssl_block}
|
||||||
|
${server_dns}
|
||||||
location = / { return 302 /docs; }
|
location = / { return 302 /docs; }
|
||||||
location / {
|
location / {
|
||||||
${proxy_root}
|
${proxy_root}
|
||||||
@@ -2578,10 +2581,11 @@ EOF
|
|||||||
write_nginx_site_ws() {
|
write_nginx_site_ws() {
|
||||||
local domain="$1"
|
local domain="$1"
|
||||||
local ssl_type="${2:-none}"
|
local ssl_type="${2:-none}"
|
||||||
local conf http_preamble ssl_block proxy_ws
|
local conf http_preamble ssl_block proxy_ws server_dns
|
||||||
conf="$(nginx_conf_target ws)"
|
conf="$(nginx_conf_target ws)"
|
||||||
proxy_ws="$(render_proxy_rewrite ws /ws)"
|
proxy_ws="$(render_proxy_rewrite ws /ws)"
|
||||||
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
||||||
|
server_dns="$(nginx_docker_server_dns_block)"
|
||||||
|
|
||||||
if [[ "$ssl_type" == "none" ]]; then
|
if [[ "$ssl_type" == "none" ]]; then
|
||||||
nginx_write_conf "$conf" <<EOF
|
nginx_write_conf "$conf" <<EOF
|
||||||
@@ -2589,6 +2593,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
|
${server_dns}
|
||||||
location / {
|
location / {
|
||||||
${proxy_ws}
|
${proxy_ws}
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -2610,6 +2615,7 @@ ${http_preamble}server {
|
|||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
${ssl_block}
|
${ssl_block}
|
||||||
|
${server_dns}
|
||||||
location / {
|
location / {
|
||||||
${proxy_ws}
|
${proxy_ws}
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -2632,10 +2638,11 @@ write_nginx_site_minio() {
|
|||||||
local kind="$2"
|
local kind="$2"
|
||||||
local label="$3"
|
local label="$3"
|
||||||
local ssl_type="${4:-none}"
|
local ssl_type="${4:-none}"
|
||||||
local conf http_preamble ssl_block proxy_root
|
local conf http_preamble ssl_block proxy_root server_dns
|
||||||
conf="$(nginx_conf_target "$label")"
|
conf="$(nginx_conf_target "$label")"
|
||||||
proxy_root="$(render_proxy_root "$kind")"
|
proxy_root="$(render_proxy_root "$kind")"
|
||||||
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
http_preamble="$(nginx_http_server_preamble "$domain" "$ssl_type")"
|
||||||
|
server_dns="$(nginx_docker_server_dns_block)"
|
||||||
|
|
||||||
if [[ "$ssl_type" == "none" ]]; then
|
if [[ "$ssl_type" == "none" ]]; then
|
||||||
nginx_write_conf "$conf" <<EOF
|
nginx_write_conf "$conf" <<EOF
|
||||||
@@ -2644,6 +2651,7 @@ server {
|
|||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
client_max_body_size 1024m;
|
client_max_body_size 1024m;
|
||||||
|
${server_dns}
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
location / {
|
location / {
|
||||||
${proxy_root}
|
${proxy_root}
|
||||||
@@ -2661,6 +2669,7 @@ ${http_preamble}server {
|
|||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
${ssl_block}
|
${ssl_block}
|
||||||
client_max_body_size 1024m;
|
client_max_body_size 1024m;
|
||||||
|
${server_dns}
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
location / {
|
location / {
|
||||||
${proxy_root}
|
${proxy_root}
|
||||||
|
|||||||
Reference in New Issue
Block a user