In 4d04d95b02 (#113)
apache/vhosts/standard.sls has been modified by @genuss to include
apache.config on the basis that apache.config was now able to retrieve the
interfaces/ports from pillar data in apache:sites.
I use apache:sites to register virtual hosts with non-standard
"template_file" (they contain the desired configuration directly)
and the "interface/port" keys are thus not meaningful.
apache:
sites:
example.com:
template_file: salt://vm/example/apache-vhost.conf
DocumentRoot: False
The generated ports.conf ends up containing only "*:80" while
my virtual host configuration files need ports 80 and 443. The
situation was perfectly fine up to now because the default configuration
file handles both of those ports if you have mod_ssl installed.
People who want to use apache.config should just explicitly include
that state, we should not force its usage to all apache.vhosts.standard
users.
DocumentRoot is useless for a plain redirect or proxy vhost, no need to
force creating the directory.
Signed-off-by: Julien Cristau <julien.cristau@logilab.fr>
If the DocumentRoot value wasn't set, applying the state would cause the
following error:
ID: site.example.com-documentroot
Function: file.directory
Name: None
Result: False
Comment: Specified file None is not an absolute path
Started: 15:07:05.596723
Duration: 4.929 ms
Changes:
This fixes the problem by not trying to check for the DocumentRoot directory is
the value is missing.
Replace require_all with use_require in map.jinja, we want to be able
to use custom Require values.
Remove uneeded Directory in standard.tmpl and add conditional and
default value for Require.
Fix bad filenames in standard.sls