forked from infra/ansible
Add ccc-r.de and ccc-regensburg.de to web.
This commit is contained in:
parent
77e068742c
commit
89c9e8031c
@ -13,3 +13,17 @@ www.binary-kitchen.de:
|
||||
perm: '400'
|
||||
format: key
|
||||
action: 'service nginx restart'
|
||||
|
||||
www.ccc-r.de:
|
||||
- path: /etc/nginx/ssl/www.ccc-r.de.crt
|
||||
user: root
|
||||
group: root
|
||||
perm: '400'
|
||||
format: crt,ca
|
||||
action: 'service nginx restart'
|
||||
- path: /etc/nginx/ssl/www.ccc-r.de.key
|
||||
user: root
|
||||
group: root
|
||||
perm: '400'
|
||||
format: key
|
||||
action: 'service nginx restart'
|
||||
|
@ -54,3 +54,33 @@ server {
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name ccc-r.de www.ccc-r.de ccc-regensburg.de www.ccc-regensburg.de;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type "text/plain";
|
||||
alias /var/www/acme-challenge;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://www.ccc-r.de$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name www.ccc-r.de;
|
||||
|
||||
ssl_certificate_key /etc/nginx/ssl/www.ccc-r.de.key;
|
||||
ssl_certificate /etc/nginx/ssl/www.ccc-r.de.crt;
|
||||
|
||||
root /var/www/ccc-r;
|
||||
|
||||
default_type text/html;
|
||||
}
|
||||
|
@ -10,10 +10,14 @@
|
||||
- name: Create vhost directory
|
||||
file: path=/var/www/kitchen state=directory owner=www-data group=www-data
|
||||
|
||||
- name: Ensure certificates are available
|
||||
- name: Ensure (BK) certificates are available
|
||||
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/www.binary-kitchen.de.key -out /etc/nginx/ssl/www.binary-kitchen.de.crt -days 730 -subj "/CN=www.binary-kitchen.de" creates=/etc/nginx/ssl/www.binary-kitchen.de.crt
|
||||
notify: Restart nginx
|
||||
|
||||
- name: Ensure (CCC-R) certificates are available
|
||||
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/www.ccc-r.de.key -out /etc/nginx/ssl/www.ccc-r.de.crt -days 730 -subj "/CN=www.ccc-r.de" creates=/etc/nginx/ssl/www.ccc-r.de.crt
|
||||
notify: Restart nginx
|
||||
|
||||
- name: Configure certificate manager
|
||||
copy: src=certs dest=/etc/acme/domains.d/www.binary-kitchen.de.conf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user