Proper disabling of the default vhost

Removing the file /etc/apache2/sites-available/000-default.conf leads to an error when Apache is restarted.
So the symlink in /etc/apache2/sites-enabled/ should be removed, the actual file can stay.
This commit is contained in:
Philipp Marmet 2016-05-18 13:01:05 +02:00
parent c9344cf81c
commit df5edcd8a2

View File

@ -5,9 +5,10 @@
include: include:
- apache - apache
apache_no-default-vhost: a2dissite 000-default.conf:
file.absent: cmd:
- name: {{ apache.vhostdir }}/000-default.conf - run
- unless: test ! -f /etc/apache2/sites-enabled/000-default.conf
- require: - require:
- pkg: apache - pkg: apache
- watch_in: - watch_in: