From 3642f4db1169e47742d4cd849ef054c8881ad58d Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 14 Nov 2023 16:49:27 +0100 Subject: [PATCH] event_web: use final domain for EH --- roles/event_web/files/certs | 6 +++--- roles/event_web/files/vhost | 12 ++++++------ roles/event_web/tasks/main.yml | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/event_web/files/certs b/roles/event_web/files/certs index 65485a8..b19cea4 100644 --- a/roles/event_web/files/certs +++ b/roles/event_web/files/certs @@ -1,13 +1,13 @@ --- -eh2x.binary-kitchen.de: -- path: /etc/nginx/ssl/eh2x.binary-kitchen.de.crt +eh21.easterhegg.eu: +- path: /etc/nginx/ssl/eh21.easterhegg.eu.crt user: root group: root perm: '400' format: crt,ca action: '/usr/sbin/service nginx restart' -- path: /etc/nginx/ssl/eh2x.binary-kitchen.de.key +- path: /etc/nginx/ssl/eh21.easterhegg.eu.key user: root group: root perm: '400' diff --git a/roles/event_web/files/vhost b/roles/event_web/files/vhost index 3738cdd..c51b209 100644 --- a/roles/event_web/files/vhost +++ b/roles/event_web/files/vhost @@ -2,7 +2,7 @@ server { listen 80; listen [::]:80; - server_name eh2x.binary-kitchen.de; + server_name eh21.easterhegg.eu; location /.well-known/acme-challenge { default_type "text/plain"; @@ -10,7 +10,7 @@ server { } location / { - return 301 https://eh2x.binary-kitchen.de$request_uri; + return 301 https://eh21.easterhegg.eu$request_uri; } } @@ -18,10 +18,10 @@ server { listen 443 ssl http2; listen [::]:443 ssl http2; - server_name eh2x.binary-kitchen.de; + server_name eh21.easterhegg.eu; - ssl_certificate_key /etc/nginx/ssl/eh2x.binary-kitchen.de.key; - ssl_certificate /etc/nginx/ssl/eh2x.binary-kitchen.de.crt; + ssl_certificate_key /etc/nginx/ssl/eh21.easterhegg.eu.key; + ssl_certificate /etc/nginx/ssl/eh21.easterhegg.eu.crt; - root /var/www/eh2x; + root /var/www/eh21; } diff --git a/roles/event_web/tasks/main.yml b/roles/event_web/tasks/main.yml index e375cbd..ad10c96 100644 --- a/roles/event_web/tasks/main.yml +++ b/roles/event_web/tasks/main.yml @@ -6,15 +6,15 @@ - php-fpm - name: Create vhost directory - file: path=/var/www/eh2x state=directory owner=www-data group=www-data + file: path=/var/www/eh21 state=directory owner=www-data group=www-data - name: Ensure certificates are available - command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/eh2x.binary-kitchen.de.key -out /etc/nginx/ssl/eh2x.binary-kitchen.de.crt -days 730 -subj "/CN=eh2x.binary-kitchen.de" creates=/etc/nginx/ssl/eh2x.binary-kitchen.de.crt + command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/eh21.easterhegg.eu.key -out /etc/nginx/ssl/eh21.easterhegg.eu.crt -days 730 -subj "/CN=eh21.easterhegg.eu" creates=/etc/nginx/ssl/eh21.easterhegg.eu.crt notify: Restart nginx -#- name: Configure certificate manager -# copy: src=certs dest=/etc/acertmgr/eh2x.binary-kitchen.de.conf -# notify: Run acertmgr +- name: Configure certificate manager + copy: src=certs dest=/etc/acertmgr/eh21.easterhegg.eu.conf + notify: Run acertmgr - name: Configure vhosts copy: src=vhost dest=/etc/nginx/sites-available/www