Migrate Keycloak from ThinkCCCluster onto Chaosknoten

Co-authored-by: Max <max@mlem.cloud>
This commit is contained in:
June 2023-08-07 23:33:15 +02:00 committed by julian
commit 09e0c710af
10 changed files with 38 additions and 19 deletions

View file

@ -8,7 +8,7 @@ server {
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 10.31.206.11;
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;

View file

@ -2,8 +2,20 @@
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
# Also see: https://www.keycloak.org/server/reverseproxy
server {
listen 443 ssl http2;
#listen [::]:443 ssl http2;
# Disable this for now.
#listen 443 ssl http2;
##listen [::]:443 ssl http2;
# Listen on a custom port for the proxy protocol.
listen 8444 ssl http2 proxy_protocol;
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
server_name keycloak-admin.ccchh.net;
@ -29,6 +41,9 @@ server {
# Also provide "_hidden" for by, since it's not relevant.
proxy_set_header Forwarded "for=$remote_addr;proto=https;host=$host;by=_hidden";
allow 185.161.129.132/32;
deny all;
location /js/ {
proxy_pass http://127.0.0.1:8080/js/;
}

View file

@ -1,6 +1,8 @@
map $host $upstream_acme_challenge_host {
cloud.hamburg.ccc.de cloud-intern.hamburg.ccc.de:31820;
pad.hamburg.ccc.de pad-intern.hamburg.ccc.de:31820;
id.ccchh.net 172.31.17.144:31820;
keycloak-admin.ccchh.net 172.31.17.144:31820;
default "";
}

View file

@ -20,6 +20,8 @@ stream {
map $ssl_preread_server_name $address {
cloud.hamburg.ccc.de cloud-intern.hamburg.ccc.de:8443;
pad.hamburg.ccc.de pad-intern.hamburg.ccc.de:8443;
id.ccchh.net 172.31.17.144:8443;
keycloak-admin.ccchh.net 172.31.17.144:8444;
}
server {

View file

@ -8,8 +8,6 @@ map $host $upstream_acme_challenge_host {
thinkcccore3.ccchh.net 10.31.242.6;
wiki.ccchh.net 10.31.206.13:31820;
zigbee2mqtt.ccchh.net 10.31.208.25:31820;
id.ccchh.net 10.31.206.12:31820;
keycloak-admin.ccchh.net 10.31.206.12:31820;
esphome.ccchh.net 10.31.208.24:31820;
aes.ccchh.net 10.31.206.14:31820;
proxmox-backup-server.ccchh.net 10.31.208.28;

View file

@ -17,7 +17,6 @@ events {
stream {
map $ssl_preread_server_name $address {
wiki.ccchh.net 10.31.206.13:8443;
id.ccchh.net 10.31.206.12:8443;
aes.ccchh.net 10.31.206.14:8443;
default 127.0.0.1:8443;
}