From b45a5f4fc47eee040d3380735e54ee442a0315cb Mon Sep 17 00:00:00 2001 From: Arnold Bechtoldt Date: Sat, 4 Jan 2014 19:29:22 +0100 Subject: [PATCH] adding mod_proxy and mod_proxy_http states, updating the README doc --- README.rst | 10 ++++++++++ apache/mod_proxy.sls | 16 ++++++++++++++++ apache/mod_proxy_http.sls | 18 ++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 apache/mod_proxy.sls create mode 100644 apache/mod_proxy_http.sls diff --git a/README.rst b/README.rst index df12111..12a2c53 100644 --- a/README.rst +++ b/README.rst @@ -20,6 +20,16 @@ Available states Installs the Apache package and starts the service. +``apache.mod_proxy`` +------------------- + +Enables the Apache module mod_proxy. + +``apache.mod_proxy_http`` +------------------- + +Enables the Apache module mod_proxy_http and requires the Apache module mod_proxy to be enabled. + ``apache.mod_wsgi`` ------------------- diff --git a/apache/mod_proxy.sls b/apache/mod_proxy.sls new file mode 100644 index 0000000..1015e4e --- /dev/null +++ b/apache/mod_proxy.sls @@ -0,0 +1,16 @@ +{% if grains['os_family']=="Debian" %} + +include: + - apt + - apache + +a2enmod proxy: + cmd.run: + - unless: ls /etc/apache2/mods-enabled/proxy.load + - order: 225 + - require: + - pkg: apache + - watch_in: + - cmd: apache-restart + +{% endif %} diff --git a/apache/mod_proxy_http.sls b/apache/mod_proxy_http.sls new file mode 100644 index 0000000..83f7405 --- /dev/null +++ b/apache/mod_proxy_http.sls @@ -0,0 +1,18 @@ +{% if grains['os_family']=="Debian" %} + +include: + - apt + - apache + - apache.mod_proxy + +a2enmod proxy_http: + cmd.run: + - unless: ls /etc/apache2/mods-enabled/proxy_http.load + - order: 225 + - require: + - pkg: apache + - cmd: a2enmod proxy + - watch_in: + - cmd: apache-restart + +{% endif %}