From 97c91fb3c07366770434f52eca19fab8fc85c57b Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Sat, 12 Mar 2022 19:39:45 +0100 Subject: [PATCH] Remove default vhosts --- roles/apache-install/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/apache-install/tasks/main.yml b/roles/apache-install/tasks/main.yml index 51bc7bb..13a900b 100644 --- a/roles/apache-install/tasks/main.yml +++ b/roles/apache-install/tasks/main.yml @@ -13,6 +13,21 @@ path: /var/www/html state: absent +- name: Remove default vHost + become: true + command: a2dissite 000-default.conf + notify: Restart apache2 service + +- name: Remove default vHost conf files + become: true + file: + path: "/etc/apache2/sites-available/{{ item }}" + state: absent + with_items: + - 000-default.conf + - default-ssl.conf + notify: Restart apache2 service + - name: Create /var/www/empty for *:80 vHosts become: true file: