Commit Graph

61 Commits

Author SHA1 Message Date
Javier Bértoli
ffac9b2381 Added minimal template (fixes #34) 2017-04-23 14:38:17 -03:00
alxwr
0e670f47df Merge pull request #170 from bmwiedemann/fix2
fix standard.tmpl
2017-03-28 16:36:14 +02:00
alxwr
b003b82249 Merge pull request #169 from bmwiedemann/fix1
drop %O from default LogFormat
2017-03-28 16:24:06 +02:00
Bernhard M. Wiedemann
f25d7707cf fix standard.tmpl
with salt-ssh-2016.11.3 it errored out with
TemplateNotFound: apache/map.jinja

and we were already passing in the 'apache' data as 'map'
from standard.sls
2017-03-20 17:10:22 +01:00
Bernhard M. Wiedemann
81a25d9467 drop %O from default LogFormat
because it requires mod_logio to be enabled
2017-03-20 17:09:58 +01:00
Patrick Chevalley
780bf3158d Add Reverse Proxy directives, GeoIP, Certificates management, mostly for RedHat 2017-03-09 12:44:32 +01:00
Alexander Weidinger
cc9d81c3b1 Made Timeout optional 2017-02-01 23:39:29 +01:00
alxwr
217b6caa64 Merge pull request #118 from opdude/feature/add-fields
Added Timeout and LimitRequestsFields to vhosts
2017-02-01 23:12:13 +01:00
dexbleeker
bf66e749d1 Append slash to RedirectTarget (#161) 2016-10-18 12:48:59 -07:00
John Kristensen
10ae336f12 Correct ProxyPassTarget default for ProxyPassReverseTarget (#154)
According to the pillar.example file there is no site.ProxyPassTarget,
so ProxyPassReverseTarget should default to proxyargs.ProxyPassTarget
(ie. site.ProxyRoute.ProxyPassTarget)
2016-08-02 21:29:53 -07:00
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
Martin Jackson
6382785cc9 Add proxyrequests directive (#144)
* Add ProxyRequests directive

This allows or prevents Apache httpd from functioning as a forward proxy server.
[See](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyrequests).
The default action is off so I've set this a the default for this formula so it does not change the default behaviour.

* Add example pillar usage
2016-05-24 10:10:01 -07:00
Martin Jackson
b1640f4f3d [#141] Support additional options for Proxypass (#142)
* Add support for proxy pass target options

* Add example usage
2016-05-23 10:32:12 -07:00
Philipp Marmet
01c9ca4a56 use default style for cmd.run: instead of cmd: - run 2016-05-18 17:08:22 +02:00
Nils Kalchhauser
fa291e289a fix line feed suppression in standard.tmpl 2016-04-10 22:17:44 +02:00
Daniel Hobley
9b8932b267 Fixed a bug where the Require parameter would be on the same line as location
- This is then ignored by Apache
2016-02-18 16:24:35 +01:00
Daniel Hobley
e281a7ba82 Added Timeout and LimitRequestsFields to vhosts 2016-02-18 16:22:22 +01:00
a.genus
4d04d95b02 Manage ports.conf file on Debian 2016-02-01 19:03:47 +03:00
a.genus
ba6679ef66 Remove breaking changes 2016-02-01 19:01:02 +03:00
Christian McHugh
f8d90931f8 Cleanup whitespace in generated vhosts
Correct handling of allow encoded slashes
2016-01-31 16:35:29 -06:00
David Douard
f01c72c637 Allow to configure several interfaces for a vhost.
This is done by split the interface pillar value instead of using a proper
list so it behaves exactly the same as before for simple 1 interface cases
(no need to refactor one's pillar files).

The resulting is something like:

  Listen 1.2.3.4:80
  Listen [2001🔤def💯:3]:80

  <VirtualHost 1.2.3.4:80 [2001🔤def💯:3]:80>
  ...
2016-01-25 12:25:29 +01:00
Rowcliffe Browne
4987f3d556 allow AllowEncodedSlashes directive in vhosts.
Apache2 docs state this is global, but vhost overrides it even when not specified.

additionally, this directive is defaulted differently across distributions (eg. CentOS is default 'On')

this change allows control of the directive.
2016-01-20 12:17:41 +08:00
a.genus
cac7545070 Add listen directive to vhosts templates and remove ports.conf 2015-12-24 16:01:32 +03:00
root
3742b40f86 Added support for Alias and Locations, as well as enabling Dav 2015-12-10 06:59:32 +10: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
Niels Abspoel
f6a0c84544 Merge pull request #56 from thornycrackers/master
Create defaul vhost directories when DocumentRoot is not set
2015-06-17 16:11:29 +02:00
Jonathan Ballet
a8f2d89995 ssl: also support the SSLCertificateChainFile required by some providers 2015-06-09 11:54:07 +02:00
Jonathan Ballet
c9d9d954de proxy: support SSL certificate in the proxy template 2015-06-09 11:48:35 +02:00
Cody Hiar
07b2a9f9f5 Create defaul vhost directories when DocumentRoot is not set 2015-05-31 12:17:25 -06:00
Mosen
d4b1af0af4 Fix unnecessary comparison against boolean in vhosts/standard.tmpl 2015-05-14 16:55:11 +10:00
Mosen
f135e2e0d5 Fix incorrect syntax in pillar example for SSLCertificateFile, SSLCertificateKeyFile
Fix check for SSLCertificateFile, SSLCertificateKeyFile variables in vhosts/standard.tmpl, now using dict.get()
2015-05-14 12:38:27 +10:00
Forrest
99ea682cfb Merge pull request #52 from daschatten/master
Add basic SSL functionality.
2015-04-02 08:52:42 -07:00
Florian Bittner
dbb86f2bc4 Add basic SSL functionality. 2015-04-02 14:23:21 +02:00
Forrest
39176444d1 Merge pull request #48 from multani/fix-jinja-reverse
Fix Jinja's reverse
2015-03-25 19:25:38 -07: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
Jonathan Ballet
74e4c4d7d5 Make proxies order stable 2015-03-25 14:48:13 +01:00
Jonathan Ballet
3f4a7667f7 Jinja's reverse is a filter, use it accordingly 2015-03-25 14:47:55 +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
sebastien.fleury
fce8d72c12 Issue#41 configure multi proxypass configuration in vhost 2015-03-11 18:35:41 +01:00
root
2ba72e613d Add new templates 'proxy.tmpl' and 'redirect.tmpl'. Add comment pointing to new templates to pillar.example. 2015-02-15 00:06:44 +01:00
Adrien Bréfort
3612927174 Fix default Options. 2014-10-28 18:50:04 +01: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
Berry Langerak
b8fe242d35 Adding support for Apache 2.4 on Ubuntu 14.04
- Adding confext to virtualhost names.
- Renaming the default config file for Ubuntu (000-default.conf).
- Adding ability to use "Require all granted".
2014-10-01 10:35:53 +02:00