forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of adellam/ansible-roles into master
This commit is contained in:
commit
e3722f266a
|
@ -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' ]
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue