Unverified Commit 3cf5e7a6 authored by Marc Crebassa's avatar Marc Crebassa Committed by GitHub
Browse files

Merge pull request #64 from UdelaRInterior/disable-apache-nginx-default-site

Disable the default site of apache and nginx on demand
parents ae408974 4808af66
......@@ -174,6 +174,10 @@ nextcloud_websrv: "apache2"
```
The http server used by nextcloud. Available values are: **apache2** or **nginx**.
```YAML
nextcloud_disable_websrv_default_site: false
```
Disable the default site of the chosen http server. (`000-default.conf` in Apache, `default` in Nginx.)
```YAML
nextcloud_websrv_template: "templates/{{nextcloud_websrv}}_nc.j2"
```
The jinja2 template creating the instance configuration for your webserver.
......
......@@ -31,6 +31,7 @@ nextcloud_instance_name: "{{ nextcloud_trusted_domain | first }}"
nextcloud_install_websrv: true
nextcloud_websrv: "apache2" # "apache2" | "nginx"
nextcloud_disable_websrv_default_site: false
nextcloud_websrv_template: "templates/{{nextcloud_websrv}}_nc.j2"
nextcloud_webroot: "/opt/nextcloud"
nextcloud_data_dir: "/var/ncdata"
......
......@@ -54,3 +54,10 @@
src: /etc/apache2/sites-available/nc_{{ nextcloud_instance_name }}.conf
state: link
notify: reload http
- name: "[APACHE] - Disable apache default site"
file:
path: /etc/apache2/sites-enabled/000-default.conf
state: absent
when: nextcloud_disable_websrv_default_site | bool
notify: reload http
\ No newline at end of file
......@@ -78,3 +78,10 @@
src: /etc/nginx/sites-available/nc_{{ nextcloud_instance_name }}.cnf
state: link
notify: reload http
- name: "[NGINX] - Disable nginx default site"
file:
path: /etc/nginx/sites-enabled/default
state: absent
when: nextcloud_disable_websrv_default_site | bool
notify: reload http
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment