Added example shows 503 code instead of "It works!" page.master
Configures Apache name-based virtual hosts and creates virtual host directories using data from Pillar. | Configures Apache name-based virtual hosts and creates virtual host directories using data from Pillar. | ||||
``apache.own_default_vhost`` | |||||
-------------------------- | |||||
Replace default vhost with own version. By default, it's 503 code. (Debian Only) | |||||
Example Pillar: | Example Pillar: | ||||
.. code:: yaml | .. code:: yaml |
<VirtualHost *:80> | |||||
RewriteEngine on | |||||
RewriteRule ^/(.*) blah [R=503] | |||||
</VirtualHost> |
{% if grains['os_family']=="Debian" %} | |||||
{% from "apache/map.jinja" import apache with context %} | |||||
include: | |||||
- apache | |||||
apache_own-default-vhost: | |||||
file.managed: | |||||
- name: {{ apache.vhostdir }}/000-default.conf | |||||
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/sites-available/000-default.conf | |||||
- require: | |||||
- pkg: apache | |||||
- watch_in: | |||||
- module: apache-reload | |||||
{% endif %} |