Browse Source

Merge pull request #91 from elevennl/master

Added installation support for mod_pagespeed on RedHat
master
Forrest 9 years ago
parent
commit
fadff5c544
3 changed files with 5 additions and 6 deletions
  1. +1
    -1
      README.rst
  2. +2
    -0
      apache/map.jinja
  3. +2
    -5
      apache/mod_pagespeed.sls

+ 1
- 1
README.rst View File

@@ -68,7 +68,7 @@ Enables the Apache module mod_headers. (Debian Only)
``apache.mod_pagespeed``
------------------------

Installs and Enables the mod_pagespeed module. (Debian Only)
Installs and Enables the mod_pagespeed module. (Debian and RedHat Only)

``apache.mod_php5``
-------------------

+ 2
- 0
apache/map.jinja View File

@@ -9,6 +9,7 @@
'mod_wsgi': 'libapache2-mod-wsgi',
'mod_php5': 'libapache2-mod-php5',
'mod_fcgid': 'libapache2-mod-fcgid',
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb',

'vhostdir': '/etc/apache2/sites-available',
'confdir': '/etc/apache2/conf.d',
@@ -26,6 +27,7 @@

'mod_wsgi': 'mod_wsgi',
'mod_php5': 'php',
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm',

'vhostdir': '/etc/httpd/vhosts.d',
'confdir': '/etc/httpd/conf.d',

+ 2
- 5
apache/mod_pagespeed.sls View File

@@ -1,4 +1,3 @@
{% if grains['os_family']=="Debian" %}
{% from "apache/map.jinja" import apache with context %}

include:
@@ -8,9 +7,9 @@ libapache2-mod-pagespeed:
pkg:
- installed
- sources:
- mod-pagespeed-stable: https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb

- mod-pagespeed-stable: {{ apache.mod_pagespeed_source }}

{% if grains['os_family']=="Debian" %}
a2enmod pagespeed:
cmd.run:
- unless: ls /etc/apache2/mods-enabled/pagespeed.load
@@ -20,7 +19,6 @@ a2enmod pagespeed:
- watch_in:
- service: apache


{% for dir in ['/var/cache/mod_pagespeed', '/var/log/pagespeed'] %}
{{ dir }}:
file:
@@ -53,5 +51,4 @@ a2enmod pagespeed:
fi;
endscript
}

{% endif %}

Loading…
Cancel
Save