...
 
Commits (2)
<IfModule mod_ssl.c>
<IfModule mod_rewrite.c>
<IfModule mod_proxy.c>
<VirtualHost *:80>
ServerName {{domain}}
Redirect permanent / https://{{domain}}/
</VirtualHost>
<VirtualHost *:443>
ServerName {{domain}}
SSLEngine On
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
SSLCertificateFile {{path}}/server.cert
SSLCACertificateFile {{path}}/intermediate.cert
ProxyVia full
RewriteEngine On
<Proxy *>
Require all granted
</Proxy>
ProxyPass /alfmb http://127.0.0.1:8080/alfresco/s/parashift/alfbi/proxymb
ProxyPassReverse /alfmb http://127.0.0.1:8080/alfresco/s/parashift/alfbi/proxymb
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ProxyTimeout {{ salt['pillar.get']('sslproxy:timeout', 600) }}
</VirtualHost>
</IfModule>
</IfModule>
</IfModule>
{% from "sslproxy/map.jinja" import apache with context %}
include:
- sslproxy
{{apache.etc.site}}/alfbi-proxy.conf:
file.managed:
- source: salt://alfbi-proxy/files/proxy.conf
- template: jinja
- context:
domain: {{pillar['metabase_domain']}}
path: {{apache.etc.dir}}
- require:
- pkg: {{apache.pkg}}
- watch_in:
- service: {{apache.pkg}}
{% if salt['grains.get']('os_family') == "Debian" %}
enable_site_alfbi_proxy:
cmd.run:
- name: a2ensite alfbi-proxy
- unless: a2query -s alfbi-proxy
- watch_in:
- service: apache2
- require:
- file: /etc/apache2/server.cert
- file: /etc/apache2/intermediate.cert
- file: {{apache.etc.site}}/alfbi-proxy.conf
{% endif %}