diff --git a/deploy.sh b/deploy.sh index 3d46f98..11e8f47 100644 --- a/deploy.sh +++ b/deploy.sh @@ -36,6 +36,58 @@ replace_string_recursive() { # example use # replace_string_recursive "/path/to/directory" "oldstring" "newstring" +# sqlite db replace function +replace_in_sqlite_db() { + local DB_PATH="$1" + local OLD_STRING="$2" + local NEW_STRING="$3" + + # Check if the database file exists + if [ ! -f "$DB_PATH" ]; then + echo "Error: Database file '$DB_PATH' does not exist." + return 1 + fi + + echo "Starting replacement of '$OLD_STRING' with '$NEW_STRING' in '$DB_PATH'..." + + # Get a list of all tables in the database + local TABLES + TABLES=$(sqlite3 "$DB_PATH" ".tables") + + # Loop through each table + for TABLE in $TABLES; do + echo "Processing table: $TABLE" + + # Get a list of all columns in the table + local COLUMNS + COLUMNS=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' '{print $2}' | grep -v '^$') + + # Loop through each column + for COLUMN in $COLUMNS; do + # Check if the column is a text type (simplistic check) + local COLUMN_TYPE + COLUMN_TYPE=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' -v col="$COLUMN" '$2 == col {print $3}') + + # Only proceed if the column type contains 'TEXT' (case-insensitive) + if [[ "$COLUMN_TYPE" =~ [Tt][Ee][Xx][Tt] ]]; then + echo " Updating column: $COLUMN (type: $COLUMN_TYPE)" + + # Perform the replacement + sqlite3 "$DB_PATH" " + UPDATE $TABLE + SET $COLUMN = replace($COLUMN, '$OLD_STRING', '$NEW_STRING') + WHERE $COLUMN LIKE '%$OLD_STRING%'; + " + fi + done + done + + echo "Replacement completed for all text-type columns in '$DB_PATH'." +} + +#example usage: replace_in_sqlite_db "database.sqlite" "Europe/Amsterdam" "UTC" + + # what this script needs to do: diff --git a/prepdb.sh b/prepdb.sh new file mode 100644 index 0000000..d649799 --- /dev/null +++ b/prepdb.sh @@ -0,0 +1,58 @@ +# sqlite db replace function +replace_in_sqlite_db() { + local DB_PATH="$1" + local OLD_STRING="$2" + local NEW_STRING="$3" + + # Check if the database file exists + if [ ! -f "$DB_PATH" ]; then + echo "Error: Database file '$DB_PATH' does not exist." + return 1 + fi + + echo "Starting replacement of '$OLD_STRING' with '$NEW_STRING' in '$DB_PATH'..." + + # Get a list of all tables in the database + local TABLES + TABLES=$(sqlite3 "$DB_PATH" ".tables") + + # Loop through each table + for TABLE in $TABLES; do + echo "Processing table: $TABLE" + + # Get a list of all columns in the table + local COLUMNS + COLUMNS=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' '{print $2}' | grep -v '^$') + + # Loop through each column + for COLUMN in $COLUMNS; do + # Check if the column is a text type (simplistic check) + local COLUMN_TYPE + COLUMN_TYPE=$(sqlite3 "$DB_PATH" "PRAGMA table_info($TABLE);" | awk -F'|' -v col="$COLUMN" '$2 == col {print $3}') + + # Only proceed if the column type contains 'TEXT' (case-insensitive) + if [[ "$COLUMN_TYPE" =~ [Tt][Ee][Xx][Tt] ]]; then + echo " Updating column: $COLUMN (type: $COLUMN_TYPE)" + + # Perform the replacement + sqlite3 "$DB_PATH" " + UPDATE $TABLE + SET $COLUMN = replace($COLUMN, '$OLD_STRING', '$NEW_STRING') + WHERE $COLUMN LIKE '%$OLD_STRING%'; + " + fi + done + done + + echo "Replacement completed for all text-type columns in '$DB_PATH'." +} + +#set script directory +scriptdir="$(dirname "$(realpath "$0")")" + +#example usage: replace_in_sqlite_db "database.sqlite" "Europe/Amsterdam" "UTC" + +replace_in_sqlite_db "$scriptdir/stacks/npm/data/database.sqlite" "sdgserver.online" "?domain?" +replace_in_sqlite_db "$scriptdir/stacks/npm/data/database.sqlite" "192.168.2.132" "?localip?" +replace_in_sqlite_db "$scriptdir/stacks/npm/data/database.sqlite" "z5fGWz2i0q" "?adminpass?" +replace_in_sqlite_db "$scriptdir/stacks/npm/data/database.sqlite" "0.0.0.0/0" "?localip?" diff --git a/stacks/npm/data/database.sqlite b/stacks/npm/data/database.sqlite new file mode 100644 index 0000000..4921bd3 Binary files /dev/null and b/stacks/npm/data/database.sqlite differ diff --git a/stacks/npm/data/nginx/proxy_host/1.conf b/stacks/npm/data/nginx/proxy_host/1.conf deleted file mode 100644 index 54076da..0000000 --- a/stacks/npm/data/nginx/proxy_host/1.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# docker.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "?localip?"; - set $port 5001; - - listen 80; -listen [::]:80; - - - server_name docker.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-1_access.log proxy; - error_log /data/logs/proxy-host-1_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/10.conf b/stacks/npm/data/nginx/proxy_host/10.conf deleted file mode 100644 index 2bf561b..0000000 --- a/stacks/npm/data/nginx/proxy_host/10.conf +++ /dev/null @@ -1,59 +0,0 @@ -# ------------------------------------------------------------ -# proxy.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "?localip?"; - set $port 81; - - listen 80; -listen [::]:80; - - - server_name proxy.?domain?; -http2 off; - - - - - - - - - - - - - access_log /data/logs/proxy-host-10_access.log proxy; - error_log /data/logs/proxy-host-10_error.log warn; - - - - - - - - location / { - - - - - - - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/11.conf b/stacks/npm/data/nginx/proxy_host/11.conf deleted file mode 100644 index 61e4f66..0000000 --- a/stacks/npm/data/nginx/proxy_host/11.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# office.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "documentserver"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name office.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-11_access.log proxy; - error_log /data/logs/proxy-host-11_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/12.conf b/stacks/npm/data/nginx/proxy_host/12.conf deleted file mode 100644 index b7d6444..0000000 --- a/stacks/npm/data/nginx/proxy_host/12.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# cloud.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "owncloud_server"; - set $port 8080; - - listen 80; -listen [::]:80; - - - server_name cloud.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-12_access.log proxy; - error_log /data/logs/proxy-host-12_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/13.conf b/stacks/npm/data/nginx/proxy_host/13.conf deleted file mode 100644 index c1f0e37..0000000 --- a/stacks/npm/data/nginx/proxy_host/13.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# www.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "site"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name www.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-13_access.log proxy; - error_log /data/logs/proxy-host-13_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/14.conf b/stacks/npm/data/nginx/proxy_host/14.conf deleted file mode 100644 index eb0a538..0000000 --- a/stacks/npm/data/nginx/proxy_host/14.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# vault.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "vaultwarden"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name vault.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-14_access.log proxy; - error_log /data/logs/proxy-host-14_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/15.conf b/stacks/npm/data/nginx/proxy_host/15.conf deleted file mode 100644 index 525ca26..0000000 --- a/stacks/npm/data/nginx/proxy_host/15.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# vpn.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "wireguard"; - set $port 51821; - - listen 80; -listen [::]:80; - - - server_name vpn.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-15_access.log proxy; - error_log /data/logs/proxy-host-15_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/16.conf b/stacks/npm/data/nginx/proxy_host/16.conf deleted file mode 100644 index 6f01dde..0000000 --- a/stacks/npm/data/nginx/proxy_host/16.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# mail.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme https; - set $server "?localip?"; - set $port 1443; - - listen 80; -listen [::]:80; - - - server_name mail.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-16_access.log proxy; - error_log /data/logs/proxy-host-16_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/17.conf b/stacks/npm/data/nginx/proxy_host/17.conf deleted file mode 100644 index 53f567b..0000000 --- a/stacks/npm/data/nginx/proxy_host/17.conf +++ /dev/null @@ -1,59 +0,0 @@ -# ------------------------------------------------------------ -# dozzle.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "dozzle"; - set $port 8080; - - listen 80; -listen [::]:80; - - - server_name dozzle.?domain?; -http2 off; - - - - - - - - - - - - - access_log /data/logs/proxy-host-17_access.log proxy; - error_log /data/logs/proxy-host-17_error.log warn; - - - - - - - - location / { - - - - - - - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/18.conf b/stacks/npm/data/nginx/proxy_host/18.conf deleted file mode 100644 index 2dacb6e..0000000 --- a/stacks/npm/data/nginx/proxy_host/18.conf +++ /dev/null @@ -1,59 +0,0 @@ -# ------------------------------------------------------------ -# dns.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "pihole"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name dns.?domain?; -http2 off; - - - - - - - - - - - - - access_log /data/logs/proxy-host-18_access.log proxy; - error_log /data/logs/proxy-host-18_error.log warn; - - - - - - - - location / { - - - - - - - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/2.conf b/stacks/npm/data/nginx/proxy_host/2.conf deleted file mode 100644 index 505a084..0000000 --- a/stacks/npm/data/nginx/proxy_host/2.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# docs.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "bookstack"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name docs.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-2_access.log proxy; - error_log /data/logs/proxy-host-2_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/3.conf b/stacks/npm/data/nginx/proxy_host/3.conf deleted file mode 100644 index 6226cfa..0000000 --- a/stacks/npm/data/nginx/proxy_host/3.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# browser.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "browser"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name browser.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-3_access.log proxy; - error_log /data/logs/proxy-host-3_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/4.conf b/stacks/npm/data/nginx/proxy_host/4.conf deleted file mode 100644 index 69ce647..0000000 --- a/stacks/npm/data/nginx/proxy_host/4.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# convert.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "convertx"; - set $port 3000; - - listen 80; -listen [::]:80; - - - server_name convert.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-4_access.log proxy; - error_log /data/logs/proxy-host-4_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/5.conf b/stacks/npm/data/nginx/proxy_host/5.conf deleted file mode 100644 index 3f6fa09..0000000 --- a/stacks/npm/data/nginx/proxy_host/5.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# dash.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "dashboard"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name dash.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-5_access.log proxy; - error_log /data/logs/proxy-host-5_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/6.conf b/stacks/npm/data/nginx/proxy_host/6.conf deleted file mode 100644 index 6941b50..0000000 --- a/stacks/npm/data/nginx/proxy_host/6.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# download.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "192.168.2.132"; - set $port 3000; - - listen 80; -listen [::]:80; - - - server_name download.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-6_access.log proxy; - error_log /data/logs/proxy-host-6_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/7.conf b/stacks/npm/data/nginx/proxy_host/7.conf deleted file mode 100644 index 1e0a64b..0000000 --- a/stacks/npm/data/nginx/proxy_host/7.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# tools.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "it-tools"; - set $port 80; - - listen 80; -listen [::]:80; - - - server_name tools.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-7_access.log proxy; - error_log /data/logs/proxy-host-7_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/8.conf b/stacks/npm/data/nginx/proxy_host/8.conf deleted file mode 100644 index d4d66d4..0000000 --- a/stacks/npm/data/nginx/proxy_host/8.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# video.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "jellyfin"; - set $port 8096; - - listen 80; -listen [::]:80; - - - server_name video.sdgserver.online; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-8_access.log proxy; - error_log /data/logs/proxy-host-8_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -} diff --git a/stacks/npm/data/nginx/proxy_host/9.conf b/stacks/npm/data/nginx/proxy_host/9.conf deleted file mode 100644 index deaf77c..0000000 --- a/stacks/npm/data/nginx/proxy_host/9.conf +++ /dev/null @@ -1,67 +0,0 @@ -# ------------------------------------------------------------ -# status.sdgserver.online -# ------------------------------------------------------------ - - - -map $scheme $hsts_header { - https "max-age=63072000; preload"; -} - -server { - set $forward_scheme http; - set $server "uptime-kuma"; - set $port 3001; - - listen 80; -listen [::]:80; - - - server_name status.?domain?; -http2 off; - - - - - - - - - - - -proxy_set_header Upgrade $http_upgrade; -proxy_set_header Connection $http_connection; -proxy_http_version 1.1; - - - access_log /data/logs/proxy-host-9_access.log proxy; - error_log /data/logs/proxy-host-9_error.log warn; - - - - - - - - location / { - - - - - - - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $http_connection; - proxy_http_version 1.1; - - - # Proxy! - include conf.d/include/proxy.conf; - } - - - # Custom - include /data/nginx/custom/server_proxy[.]conf; -}