eh22-wiki: setup EH22 wiki using Ansible by copying and mod. wiki config

Also introduce wiki_hosts group for applying dokuwiki role to multiple
hosts.
This commit is contained in:
June 2025-02-10 23:40:39 +01:00
parent 40cddb67b4
commit bdbd9ce195
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
6 changed files with 93 additions and 3 deletions
inventories/chaosknoten
playbooks
resources/chaosknoten
eh22-wiki/nginx
public-reverse-proxy/nginx

View file

@ -0,0 +1,11 @@
nginx__version_spec: ""
nginx__configurations:
- name: eh22.easterhegg.eu
content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/eh22-wiki/nginx/eh22.easterhegg.eu.conf') }}"
certbot__version_spec: ""
certbot__acme_account_email_address: j+letsencrypt-ccchh@jsts.xyz
certbot__certificate_domains:
- "eh22.easterhegg.eu"
certbot__new_cert_commands:
- "systemctl reload nginx.service"

View file

@ -10,6 +10,10 @@ all:
ansible_host: cloud-intern.hamburg.ccc.de
ansible_user: chaos
ansible_ssh_common_args: -J ssh://chaos@public-reverse-proxy.hamburg.ccc.de
eh22-wiki:
ansible_host: eh22-wiki-intern.hamburg.ccc.de
ansible_user: chaos
ansible_ssh_common_args: -J ssh://chaos@public-reverse-proxy.hamburg.ccc.de
grafana:
ansible_host: grafana-intern.hamburg.ccc.de
ansible_user: chaos
@ -55,6 +59,7 @@ all:
hosts:
ccchoir:
cloud:
eh22-wiki:
grafana:
keycloak:
lists:
@ -83,6 +88,7 @@ all:
nginx_hosts:
hosts:
ccchoir:
eh22-wiki:
grafana:
tickets:
keycloak:
@ -100,6 +106,7 @@ all:
certbot_hosts:
hosts:
ccchoir:
eh22-wiki:
grafana:
tickets:
keycloak:
@ -113,6 +120,7 @@ all:
prometheus_node_exporter_hosts:
hosts:
ccchoir:
eh22-wiki:
tickets:
keycloak:
onlyoffice:
@ -123,6 +131,7 @@ all:
infrastructure_authorized_keys_hosts:
hosts:
ccchoir:
eh22-wiki:
grafana:
tickets:
cloud:
@ -133,3 +142,7 @@ all:
public-reverse-proxy:
wiki:
zammad:
wiki_hosts:
hosts:
eh22-wiki:
wiki:

View file

@ -25,7 +25,7 @@
- foobazdmx
- name: Ensure Dokuwiki config
hosts: wiki
hosts: wiki_hosts
roles:
- dokuwiki

View file

@ -0,0 +1,66 @@
# partly generated 2022-01-08, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
server {
# Listen on a custom port for the proxy protocol.
listen 8443 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 eh22.easterhegg.eu;
ssl_certificate /etc/letsencrypt/live/eh22.easterhegg.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/eh22.easterhegg.eu/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/eh22.easterhegg.eu/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
# Maximum file upload size is 20MB - change accordingly if needed
# See: https://www.dokuwiki.org/faq:uploadsize
client_max_body_size 20M;
client_body_buffer_size 128k;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
root /var/www/dokuwiki;
index doku.php;
#Remember to comment the below out when you're installing, and uncomment it when done.
location ~ /(conf/|bin/|inc/|vendor/|install.php) { deny all; }
#Support for X-Accel-Redirect
location ~ ^/data/ { internal ; }
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$ {
expires 365d;
}
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
# rewrites "doku.php/" out of the URLs if you set the userwrite setting to .htaccess in dokuwiki config page
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1&$args last;
}
location ~ \.php$ {
try_files $uri $uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:/var/run/php/php-fpm-dokuwiki.sock;
}
}

View file

@ -35,7 +35,7 @@ map $host $upstream_acme_challenge_host {
eh11.easterhegg.eu 172.31.17.151:31820;
eh20.easterhegg.eu 172.31.17.151:31820;
www.eh20.easterhegg.eu 172.31.17.151:31820;
eh22.easterhegg.eu 172.31.17.159:31820;
eh22.easterhegg.eu 172.31.17.165:31820;
easterheggxxxx.hamburg.ccc.de 172.31.17.151:31820;
eh2003.hamburg.ccc.de 172.31.17.151:31820;
www.eh2003.hamburg.ccc.de 172.31.17.151:31820;

View file

@ -53,7 +53,7 @@ stream {
eh11.easterhegg.eu 172.31.17.151:8443;
eh20.easterhegg.eu 172.31.17.151:8443;
www.eh20.easterhegg.eu 172.31.17.151:8443;
eh22.easterhegg.eu 172.31.17.159:8443;
eh22.easterhegg.eu 172.31.17.165:8443;
easterheggxxxx.hamburg.ccc.de 172.31.17.151:8443;
eh2003.hamburg.ccc.de 172.31.17.151:8443;
www.eh2003.hamburg.ccc.de 172.31.17.151:8443;