Last active
October 14, 2016 13:43
-
-
Save a2f0/eb93df4c02d971658d46f3a6a0ca2fa4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/httpd/conf.d/{{ pillar['fqdn'] }}-ssl.conf: | |
apache.configfile: | |
- config: | |
- VirtualHost: | |
this: '*:443' | |
SSLEngine: 'on' | |
Header: set Access-Control-Allow-Origin "https://{{ pillar['fqdn'] }}" | |
SSLCertificateFile: /opt/certbot/config/live/{{ pillar['fqdn'] }}/cert.pem | |
SSLCertificateKeyFile: /opt/certbot/config/live/{{ pillar['fqdn'] }}/privkey.pem | |
SSLCertificateChainFile: /opt/certbot/config/live/{{ pillar['fqdn'] }}/fullchain.pem | |
SSLProtocol: all -SSLv2 | |
SSLCipherSuite: ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW | |
ServerName: | |
- {{ pillar['fqdn'] }} | |
ServerAlias: | |
- {{ pillar['fqdn2'] }} | |
ErrorLog: logs/{{ pillar['fqdn'] }}-ssl-error_log | |
CustomLog: logs/{{ pillar['fqdn'] }}-ssl-access_log combined | |
DocumentRoot: /opt/code/somesite/public | |
PassengerRuby: /usr/local/rbenv/versions/2.3.0/bin/ruby | |
PassengerMinInstances: 3 | |
PassengerPreStart: https://{{ pillar['fqdn'] }} | |
RailsEnv: {{ pillar['environment'] }} | |
AddType: | |
- image/svg+xml svg svgz | |
AddEncoding: | |
- gzip svgz | |
Directory: | |
this: /opt/code/somesite/public | |
Allow from: | |
- all | |
Options: | |
- -MultiViews | |
Require: | |
- all granted | |
Location: | |
this: /assets/ | |
RewriteEngine: on | |
RewriteCond: '%{HTTP:Accept-Encoding} \b(x-)?gzip\b' | |
RewriteCond: '%{REQUEST_FILENAME}.gz -s' | |
RewriteRule: ^(.+) $1.gz [L] | |
FilesMatch: | |
this: \.css\.gz$ | |
ForceType: text/css | |
Header: set Content-Encoding gzip | |
FilesMatch: | |
this: \.js\.gz$ | |
ForceType: text/javascript | |
Header: set Content-Encoding gzip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment