Merge branch 'master' of adellam/ansible-roles into master

This commit is contained in:
Andrea Dell'Amico 2020-01-05 19:30:39 +01:00 committed by Gitea
commit e3722f266a
2 changed files with 9 additions and 8 deletions

View File

@ -24,8 +24,8 @@
template: src=local.json dest=/etc/onlyoffice/documentserver/local.json owner=root group=root mode=0444
- name: Install the OnlyOffice document server configuration that enables SSL
template: src=onlyoffice-documentserver-ssl.conf dest=/etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
when: onlyoffice_docserver_letsencrypt_managed
template: src=onlyoffice-documentserver-ssl.conf dest=/etc/onlyoffice/documentserver/nginx/ds.conf
when: onlyoffice_docserver_letsencrypt_managed | bool
notify: Reload nginx
tags: [ 'onlyoffice', 'letsencrypt', 'nginx' ]

View File

@ -1,5 +1,4 @@
include /etc/nginx/includes/onlyoffice-http.conf;
include /etc/nginx/includes/http-common.conf;
## Normal HTTP host
server {
listen 0.0.0.0:80;
@ -10,7 +9,9 @@ server {
include /etc/nginx/snippets/letsencrypt-proxy.conf;
## Redirects all traffic to the HTTPS host
root /nowhere; ## root doesn't have to be a valid path since we are redirecting
rewrite ^ https://$host$request_uri? permanent;
location / {
return 301 https://$host$request_uri?;
}
}
#HTTP host for internal services
@ -21,8 +22,8 @@ server {
server_tokens off;
include /etc/nginx/snippets/letsencrypt-proxy.conf;
include /etc/nginx/includes/onlyoffice-documentserver-common.conf;
include /etc/nginx/includes/onlyoffice-documentserver-docservice.conf;
include /etc/nginx/includes/ds-*.conf;
}
## HTTPS host
@ -38,6 +39,6 @@ server {
include /etc/nginx/snippets/nginx-server-ssl.conf;
# add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
include /etc/nginx/includes/onlyoffice-documentserver-*.conf;
include /etc/nginx/includes/ds-*.conf;
}