diff --git a/defaults/main.yml b/defaults/main.yml index 105245c..53c957a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,7 @@ apache_enablerepo: "" apache_listen_port: 80 apache_listen_port_ssl: 443 +apache_remove_default_vhost: false apache_create_vhosts: true apache_vhosts_filename: "vhosts.conf" diff --git a/tasks/configure-Debian.yml b/tasks/configure-Debian.yml index f653e8c..f2a9b23 100644 --- a/tasks/configure-Debian.yml +++ b/tasks/configure-Debian.yml @@ -32,3 +32,9 @@ dest: "{{ apache_conf_path }}/sites-enabled/{{ apache_vhosts_filename }}" state: link when: apache_create_vhosts + +- name: Remove default vhost symlink in sites-enabled. + file: + path: "{{ apache_conf_path }}/sites-enabled/{{ apache_default_vhost_filename }}" + state: absent + when: apache_remove_default_vhost diff --git a/vars/apache-22.yml b/vars/apache-22.yml index e0c6ac9..eb856be 100644 --- a/vars/apache-22.yml +++ b/vars/apache-22.yml @@ -1,5 +1,6 @@ --- apache_vhosts_version: "2.2" +apache_default_vhost_filename: 000-default apache_ports_configuration_items: - { regexp: "^Listen ", diff --git a/vars/apache-24.yml b/vars/apache-24.yml index c783ce4..449a444 100644 --- a/vars/apache-24.yml +++ b/vars/apache-24.yml @@ -1,5 +1,6 @@ --- apache_vhosts_version: "2.4" +apache_default_vhost_filename: 000-default.conf apache_ports_configuration_items: - { regexp: "^Listen ",