Commit Graph

336 Commits

Author SHA1 Message Date
Imran Iqbal
6852f87b7f Fix apache:lookup regression (#252) 2019-01-29 20:28:46 +01:00
Niels Abspoel
dccfdf7962
add server_status state (#250)
Add server_status state to create a default server_status handler for localhost
2018-11-27 19:53:15 +01:00
Niels Abspoel
9490c868e0 use watch module: apache-[restart|reload] consequently 2018-11-09 00:25:52 +01:00
Niels Abspoel
dcce3f6129 Fix osfinger map.jinja
made a copy paste error in map.jinja

this fixes #247
2018-11-08 21:32:32 +01:00
Javier Bértoli
c4154ba404
Merge pull request #246 from aboe76/add_defaults.yaml
refactor map.jinja with defaults and import_yaml files
2018-11-07 19:39:25 -03:00
Niels Abspoel
094b149262 refactor map.jinja with defaults and import_yaml files 2018-11-07 22:46:30 +01:00
alxwr
e2462b2c3b
Merge pull request #245 from netmanagers/master
Add OCSP Stapling configuration capabilities to Debian
2018-11-07 21:20:12 +01:00
alxwr
4af4ff5970 Restart (if needed) before reload (#244)
Some configuration changes only take effect after a restart of the service.
When the module 'apache-reload' is triggered too early, it fails which results
in a false-negative result of the Salt run.
In order to fix that 'apache-restart' and the service definition itself are
put before 'apache-reload'. Reload should always succeed if restart did.
2018-11-07 20:06:30 +01:00
Javier Bértoli
06b1606f33 Add OCSP Stapling configuration capabilities to Debian
Document Stapling options in pillar.example
2018-11-04 15:39:34 -03:00
Andreas Thienemann
79673343a5 No automatic listener for port *
The formula currently adds a Listen directive for the port '*' if
any configured vhost is configured to listen on :* which does not
work and instead prevents apache from starting.

It is possible to prevent this by setting the
exclude_listen_directive pillar to True but this is a manual
workaround.

Instead, this commit excludes :* Listeners automatically.
2018-11-04 03:18:56 +01:00
Andreas Thienemann
4bba8862ab Delete Red Hat provided ssl.conf (#243)
When using the mod_ssl state on Red Hat family systems the httpd
server will currently not start.

This is due to duplicate Listen directives provided in the
ssl.conf file shipped with the mod_ssl rpm package and the directives
configured by saltstack.

The easy solution is to just ensure the rpm shipped mod_ssl is removed.
2018-10-27 23:27:27 +02:00
Andreas Thienemann
894e970549 Fix hardcoded path (#242)
The config.sls state uses a hardcoded file path for the welcome
config.
Use the confdir variable to build the path instead to allow for
overrides.
2018-10-27 22:13:49 +02:00
Andreas Thienemann
4ed6e228f5 Improve document root fix for Red Hat (#241)
The docroot fix from PR#240 worked fine for default servers.
But as soon as one uses vhosts this broke as the vhosts were
created under the docroot in /var/www/html rather than the better
/var/www.

Fix this by differentiating between docroot and wwwdir.
Further allow to override both in Red Hat-style configs.
The override allows to reuse this formula for the softwarecollections
rpms.
2018-10-27 15:21:51 +02:00
Andreas Thienemann
eca4daf767 Fix DocumentRoot on Red Hat
The current docroot ist set to /var/www. This is incorrect.
Fix with correct value /var/www/html.
2018-10-10 19:01:49 +02:00
Arthur Lutz
feadd58f85
[standard/vhost] unique id renamed 2018-09-11 12:52:30 +02:00
Arthur Lutz
c07e5846a4
[vhosts/standard] improve uniqueness of section id 2018-09-11 09:43:15 +02:00
Sebastian Meyer
6f3ab21d62 Allow setting APACHE_SERVER_FLAGS on Suse (#234)
SUSE reads additional FLAGS that are used on the server start. They are
read from the APACHE_SERVER_FLAGS key, so we use a2enflag/a2disflag to
set those as we do with modules.
2018-08-30 22:22:55 +02:00
ze42
1982f1ecc8 mod_remoteip: enable conf independantly (#236) 2018-08-30 22:22:28 +02:00
Adrien "ze" Urban
70ae79b991 vhosts/standard: Directory_default to DocumentRoot 2018-08-29 12:16:15 +02:00
ardin
7bac5c7c30 mod_mpm for RedHat (#160) 2018-08-17 19:42:45 +02:00
Arthur Lutz
a5debf58b3 207 configure ssl (#218)
* [ssl] [debian] manage ssl.conf with pillars
* [apache] make cyphersuite a list
* [apache/ssl] switch back to strings, lists merge is not good
2018-08-17 19:41:40 +02:00
Niels Abspoel
ac7e71bf56
Merge pull request #228 from ze42/docroot_sitename
DocumentRoot: fallback to SiteName like templates
2018-08-17 19:39:51 +02:00
Niels Abspoel
32f92e8acd
Merge pull request #227 from ze42/geoip_debian
geoip: Debian support
2018-08-17 19:39:16 +02:00
Niels Abspoel
03de980860
Merge pull request #230 from ze42/docroot_owner
vhosts/standard: allow to set docroot ownership
2018-08-17 19:38:18 +02:00
Niels Abspoel
00b437aa27
Merge pull request #232 from ze42/vhosts_cleanup
vhosts/cleanup: clean non-salted sites
2018-08-17 19:36:30 +02:00
Alexander Weidinger
33e1302a12 Create Apache's logdir if necessary 2018-08-15 02:01:40 +02:00
Adrien "ze" Urban
fdaa62d7a9 vhosts/cleanup: clean non-salted sites
Makes it easier to clean any unwanted sites
2018-07-03 11:44:24 +02:00
Adrien "ze" Urban
37f8af4b3a vhosts/standard: rewrite, simplify code
* No more if.
* Allow lookup to set default value for all docroot
* updated pillar.example
2018-06-28 15:28:03 +02:00
Adrien "ze" Urban
2bae6fea10 vhosts/standard: fix set user/group
unless test -d on file.directory seems useless.
2018-06-28 10:20:33 +02:00
Adrien "ze" Urban
5211bdd72b vhosts/standard: allow user/group option
Support for DocumentRootUser and DocumentRootGroup
2018-06-28 10:20:33 +02:00
Javier Bértoli
dc46bc8340
Merge pull request #224 from arthurlogilab/fix-fcgid-redhat
Fix fcgid redhat
2018-06-27 14:32:40 -03:00
Adrien "ze" Urban
76f05dda8e manage_security: fix file presence detection
Detect runtime, rather than before starting/installing anything.
2018-06-07 14:52:57 +02:00
Adrien "ze" Urban
0ed8f9a94b DocumentRoot: fallback to SiteName like templates
Templates already fallback to SiteName before site id.

This attemps to be consistent with them, and avoid having to explicitly specify
the DocumentRoot, when the template already does the proper inference.
2018-05-22 15:23:11 +02:00
Adrien "ze" Urban
4e15435ef4 geoip: Debian support 2018-05-22 15:20:50 +02:00
Arthur Lutz
d7e212d904 [apache/map.jinja] add RedHat fcgid package name 2018-03-23 13:39:02 +01:00
N
da543013f4
Merge pull request #222 from noelmcloughlin/FixFastCgi
Fix mod_fastcgi, mod_php5, and pkgrepo states
2018-03-15 10:47:14 +00:00
N
7e66b260e4
Merge pull request #220 from noelmcloughlin/issue122
Do not add ServerAlias unless defined
2018-03-15 10:46:55 +00:00
Niels Abspoel
fe9407df47 replace iteritems with items 2018-03-07 21:05:22 +01:00
noelmcloughlin
2c21dc0df6 Fix mod_fastcgi state/repo 2018-02-14 21:01:43 +00:00
N
f1514dab84
Merge pull request #205 from emeygret/patch-1
Add RedirectMatch option
2018-02-05 12:06:51 +00:00
Javier Bértoli
fcb434e248 Added "Managed by Salt..." headers in template and made them unifom across the formula 2018-02-04 10:26:40 -03:00
Noel McLoughin
147aa71551 Do not add ServerAlias unless defined 2018-01-30 23:20:25 +00:00
Arthur Lutz
fd23f29cf8
Merge branch 'master' into 217-customlog 2018-01-30 14:24:16 +01:00
Arthur Lutz
1ebee8bc07 [apache/vhosts] fix CustomLog on standard template 2018-01-30 14:13:12 +01:00
Noel McLoughin
853ec8e118 Allow Skipping of service manipulation via pillar (+PR comments) 2018-01-30 14:10:01 +01:00
Arthur Lutz
1b5e13a36c
Fix conflict ID #214 2018-01-16 10:04:16 +01:00
Alexander Weidinger
d3110f93f6 Manage TLS defaults 2018-01-10 01:24:17 +01:00
Alexander Weidinger
9de2372789 map.jinja: corrected Debian's confdir 2018-01-09 23:38:47 +01:00
Alexander Weidinger
cbc9ad29dc map.jinja: corrected FreeBSD defaults
(We were only supporting 2.4 anyway.)
2018-01-09 22:12:31 +01:00
Louis Haddrell
ac071586e0 Replace apache.conf_mod_wsgi if statement syntax (fixes #209) 2018-01-05 13:26:06 +00:00
Alexander Weidinger
08a21edb73 Actually fix CustomLog default values in templates 2018-01-05 01:30:42 +01:00
Alexander Weidinger
e20189e94a Revert "Fix CustomLog default values in templates"
This reverts commit 429039819d.
2018-01-05 00:59:57 +01:00
Alexander Weidinger
429039819d Fix CustomLog default values in templates 2018-01-03 02:12:54 +01:00
Wolodja Wentland
147fc0581f
Merge pull request #184 from alxwr/template-security
Template security.conf in Debian
2017-12-19 10:24:14 +00:00
emeygret
2142ab99f1
Add RedirectMatch option
in pillar add 
RedirectMatch: true
2017-12-12 11:35:14 +01:00
thomas Senay
5fea96a6a2 Split Logformat and CustomLog Directive to avoid syntax error on RedHat 2017-11-13 10:41:25 +01:00
Niels Abspoel
c86760ee4c
Merge pull request #202 from alexfrosa/master
fixed: missing LogFormat
2017-11-05 14:18:57 +01:00
alexfrosa
dca6c1b4a3
Update minimal.tmpl
Adapted log format to Apache's new default
2017-11-05 10:44:24 -02:00
Javier Bértoli
e366517ffc
Merge pull request #201 from noelmcloughlin/archlinux
ArchLinux support in map.jinja
2017-11-05 09:02:35 -03:00
Niels Abspoel
9898b4fe2f
Merge pull request #191 from alxwr/mod_fastcgi-oscodename
mod_fastcgi: use oscodename grain / call for testers
2017-11-04 21:11:48 +01:00
Alex Rosa
0475eef4ad fixed: missing LogFormat 2017-11-04 16:38:31 -02:00
Noel McLoughin
1434dcc5e9 ArchLinux OS mapping 2017-11-03 16:47:20 +00:00
Niels Abspoel
185b98a38e Merge pull request #198 from irtnog/enable-custom-mod_ssl-package
Add setting that allows deployers to override the default mod_ssl
2017-10-23 20:23:01 +02:00
Matthew X. Economou
1899f2df5e
Add setting that allows deployers to override the default mod_ssl package
Other states in this formula allow changing the Apache httpd or module
package on RHEL/CentOS, e.g., one may use packages from the httpd24
SCL to install newer versions than in the base repositories.  This
changes the apache.mod_ssl SLS to match them.
2017-10-23 09:35:31 -04:00
Noel McLoughlin
be024a6475 workaround for #192 2017-08-24 11:41:05 +01:00
Alexander Weidinger
ef1c55b45c mod_fastcgi: use oscodename grain 2017-08-23 11:40:59 +02:00
Niels Abspoel
0b117e522d Merge pull request #189 from louis-haddrell/develop
Replaced use_require with Apache version check (fixes #188)
2017-08-22 18:01:20 +02:00
Niels Abspoel
9003d2b3ce update grain check with Suse and SUSE 2017-08-03 21:11:25 +02:00
Niels Abspoel
e5313af81a add suse support to apache_modules 2017-08-03 16:18:54 +02:00
Javier Bértoli
a61504f900 Merge pull request #185 from aboe76/update_suse_config
update suse config file with latest changes
2017-08-02 07:53:14 -03:00
Louis Haddrell
2360d722b6 Replaced use_require with Apache version check (fixes #188) 2017-08-02 00:05:18 +01:00
Louis Haddrell
7e96ce8d3e Replaced Apache 2.4 syntax in RedHat Apache 2.2 config (fixes #115) 2017-08-01 15:34:06 +01:00
Raphaël Hertzog
1feaf1f392 Add map.jinja data for latest Debian and Ubuntu releases 2017-06-08 16:09:07 +02:00
Niels Abspoel
adea6485ea update suse config file with latest changes 2017-05-21 23:31:24 +02:00
Alexander Weidinger
5fa91b7b91 Template security.conf in Debian
Including optional per-OS templates

(Solves https://github.com/saltstack-formulas/apache-formula/issues/153)
2017-05-17 07:54:02 +02:00
kadogo
69bb7744c8 Correct little error for mod_fastcgi 2017-05-17 06:41:55 +02:00
kadogo
14fa8d8616 Add variables for mod_xsendfile and mod_fastcgi 2017-05-17 06:41:54 +02:00
kadogo
858d012380 Add mod_fastcgi (Debian) 2017-05-17 06:41:54 +02:00
kadogo
d4e45322bf Add mod_proxy_fcgi (Debian) 2017-05-17 06:41:54 +02:00
kadogo
7495b5fdd8 Add mod_xsenfile (Debian) 2017-05-17 06:41:54 +02:00
Niels Abspoel
34a1050c66 Merge pull request #183 from netmanagers/master
Remove duplicated ID (fixes #179), added minimal template (fixes #34)
2017-04-24 22:14:03 +02:00
Javier Bértoli
a7f66b6344 Move vhostdir to config.sls 2017-04-24 15:33:44 -03:00
Javier Bértoli
ffac9b2381 Added minimal template (fixes #34) 2017-04-23 14:38:17 -03:00
Javier Bértoli
9c9050595d Remove duplicated ID (fixes #179) 2017-04-23 14:37:26 -03:00
Mike Shade
9bf72e5d0a Correct CentOS 6 osfinger map
CentOS 6 reports as CentOS-6 rather than CentOS Linux-6 from osfinger grain
2017-04-13 12:41:53 -04:00
Gary Waters
4da54dd8de in RH, vhosts.d doesnt exisit, this makes it 2017-04-12 14:45:00 -07:00
Oleksandr Porunov
ee6b910302 Format mod_wsgi state 2017-04-06 15:11:32 +03:00
Oleksandr Porunov
7ac28f42f9 Clear uncomment state of mod_wsgi config 2017-04-06 15:03:37 +03:00
Oleksandr Porunov
c28a1097e3 Fix wsgi.conf uncomment for RedHat based OS 2017-04-05 10:42:06 +02:00
Oleksandr Porunov
0b37a14035 Fix: wsgi.conf file not found 2017-04-05 00:34:49 +02:00
Javier Bértoli
475fb8347e Add default user/group attributes as required by some states 2017-03-29 07:42:27 -03:00
alxwr
7d5e588b6e Merge pull request #168 from bmwiedemann/suse
fixes in SUSE support
2017-03-28 17:01:46 +02:00
alxwr
0e670f47df Merge pull request #170 from bmwiedemann/fix2
fix standard.tmpl
2017-03-28 16:36:14 +02:00
alxwr
7f6179365e Merge pull request #171 from porunov/master
Add uninstall state
2017-03-28 16:28:01 +02:00
alxwr
b003b82249 Merge pull request #169 from bmwiedemann/fix1
drop %O from default LogFormat
2017-03-28 16:24:06 +02:00
alxwr
8540ce92f6 Merge pull request #167 from isntall/mod_remoteip_conf
[+] debian apache2 needs to have conf enabled when making this change
2017-03-28 16:17:28 +02:00
Oleksandr Porunov
aba648965f Add a new line into uninstall state 2017-03-28 16:26:52 +03:00
Oleksandr Porunov
58e968916e Add uninstall state 2017-03-28 16:15:44 +03: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