Commit Graph

23 Commits

Author SHA1 Message Date
Raphaël Hertzog
4fa9d57d2b Do not force usage of apache.config in apache.vhosts.standard
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.
2016-06-21 17:39:35 +02:00
Philipp Marmet
01c9ca4a56 use default style for cmd.run: instead of cmd: - run 2016-05-18 17:08:22 +02:00
a.genus
4d04d95b02 Manage ports.conf file on Debian 2016-02-01 19:03:47 +03:00
Rowcliffe Browne
fd49c2c385 fix for symlink docroot failure 2015-11-17 11:16:24 +08:00
Dominik Menzi
ea065e3413 Set vhost sites as enabled by default 2015-11-16 11:43:44 +01:00
Elias Probst
ff2dd397c3 Don't execute a2dissite on each state run
Add `onlyif` check to execute `a2dissite` only when needed.
2015-09-25 09:34:28 +02:00
Julien Cristau
9be8ade5aa allow absence of DocumentRoot
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>
2015-09-21 15:47:46 +02:00
Mathieu Tarral
a7fb2f89fc add missing {% endif %} 2015-08-25 01:58:22 -04:00
Mathieu Tarral
c195dce07c add an 'enabled' attribute for a site in pillar 2015-08-25 01:50:58 -04:00
Rico Moorman
1a2d22b2e8 Correct variable name 2015-06-19 22:55:30 +02:00
Cody Hiar
07b2a9f9f5 Create defaul vhost directories when DocumentRoot is not set 2015-05-31 12:17:25 -06:00
Jonathan Ballet
42426f3f4a Don't fail on missing DocumentRoot
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.
2015-03-25 15:06:18 +01:00
Cody Hiar
f1b89abd3b Update standard.sls
Make sure that you can makedirs incase parent folders are not created
2015-03-23 16:53:45 -06:00
Cody Hiar
138a522f3f Update standard.sls
Create the vhost DocumentRoot directory if it does not exist
2015-03-23 15:22:08 -06:00
Adrien Bréfort
67e12a8bc2 Fixed Apache 2.4 support and added support for Ubuntu 14.10.
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
2014-10-28 15:13:13 +01:00
Vincent Fretin
0aec048eaf use test -f instead of ls 2014-08-01 15:32:40 +02:00
vincentfretin
18d8c0c0fb Don't execute a2ensite if the vhost is already enabled 2014-08-01 10:43:04 +02:00
Adam Herzog
be1aa5629e Use confext parameter when naming vhost config files. 2014-02-09 09:12:31 -05:00
Arnold Bechtoldt
1fce705bc0 setting the remaining changes caused by the change of cmd.wait to .module.wait in init.sls 2014-01-04 23:46:47 +01:00
Michal Galet
a3299dc1eb States for apache-reload and apache-restart using module.wait not working 2014-01-04 11:59:39 +00:00
Alan McNea
c863598ec7 Moved apache-reload and apache-restart commands to init.sls and invoke apache-reload from standard.sls 2013-11-05 19:34:06 +00:00
Seth House
f1cff2dd22 Renamed package-map.jinja to map.jinja; is used for more than package names 2013-09-03 13:28:00 -06:00
Seth House
2499a50135 Added apache.vhost formula 2013-08-29 02:10:23 -06:00