mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 06:41:36 +01:00
feat: add nginx nextcloud config
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
name: dovecot
|
||||
state: restarted
|
||||
|
||||
- name: reload nginx
|
||||
systemd:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
|
||||
- name: restart nginx
|
||||
systemd:
|
||||
name: nginx
|
||||
|
||||
2
roles/nextcloud/meta/main.yml
Normal file
2
roles/nextcloud/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- global-handlers
|
||||
@@ -5,3 +5,17 @@
|
||||
name: Nextcloud cron-cleanup
|
||||
job: /usr/bin/sudo -u www-data /usr/bin/php -f /var/www/nextcloud/cron.php
|
||||
user: root
|
||||
|
||||
- name: Template nginx base conf
|
||||
template:
|
||||
src: nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
notify:
|
||||
- reload nginx
|
||||
|
||||
- name: Template nginx nextcloud conf
|
||||
template:
|
||||
src: nginx-nextcloud.conf
|
||||
dest: /etc/nginx/sites-enabled/nextcloud.conf
|
||||
notify:
|
||||
- reload nginx
|
||||
|
||||
27
roles/nextcloud/templates/nginx.conf
Normal file
27
roles/nextcloud/templates/nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
error_log /var/log/nginx/error.log;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
Reference in New Issue
Block a user