mirror of
https://github.com/DO1JLR/ansible_playbook_servers.git
synced 2024-09-14 19:53:56 +02:00
improved redirect
This commit is contained in:
parent
d66bad0e2a
commit
e396e5bd0a
9 changed files with 39 additions and 9 deletions
|
@ -21,9 +21,11 @@ accounts:
|
||||||
- webwaffel
|
- webwaffel
|
||||||
|
|
||||||
nginx_sites:
|
nginx_sites:
|
||||||
- name: 'c3woc.org'
|
- name: 'c3woc.de'
|
||||||
webroot:
|
webroot:
|
||||||
user: 'webwaffel'
|
user: 'webwaffel'
|
||||||
|
- name: 'www.c3woc.de'
|
||||||
|
- name: 'c3woc.org'
|
||||||
- name: 'www.c3woc.org'
|
- name: 'www.c3woc.org'
|
||||||
- name: 'c3woc.eu'
|
- name: 'c3woc.eu'
|
||||||
- name: 'www.c3woc.eu'
|
- name: 'www.c3woc.eu'
|
||||||
|
|
|
@ -9,6 +9,6 @@ server {
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 308 https://c3woc.org$request_uri;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
16
templates/files/nginx/sites/c3woc.de_tls.conf
Normal file
16
templates/files/nginx/sites/c3woc.de_tls.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
|
server_name c3woc.de;
|
||||||
|
|
||||||
|
include snippets/tls_parameters_{{ site.name }}.snippet.conf;
|
||||||
|
include snippets/tls_certificate_{{ site.name }}.snippet.conf;
|
||||||
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
|
root /srv/www/c3woc.org;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,6 @@ server {
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 308 https://c3woc.org$request_uri;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,7 @@ server {
|
||||||
include snippets/tls_certificate_{{ site.name }}.snippet.conf;
|
include snippets/tls_certificate_{{ site.name }}.snippet.conf;
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
root /srv/www/c3woc.org;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ =404;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@ server {
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 308 https://c3woc.org$request_uri;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14
templates/files/nginx/sites/www.c3woc.de_tls.conf
Normal file
14
templates/files/nginx/sites/www.c3woc.de_tls.conf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
|
||||||
|
server_name www.c3woc.de;
|
||||||
|
|
||||||
|
include snippets/tls_parameters_{{ site.name }}.snippet.conf;
|
||||||
|
include snippets/tls_certificate_{{ site.name }}.snippet.conf;
|
||||||
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 308 https://c3woc.de$request_uri;
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,6 @@ server {
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 308 https://c3woc.eu$request_uri;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,6 @@ server {
|
||||||
include snippets/logging_{{ site.name }}.snippet.conf;
|
include snippets/logging_{{ site.name }}.snippet.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 308 https://c3woc.org$request_uri;
|
return 308 https://c3woc.de$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue