ansible/roles/grafana/templates/apache2-vhost-ssl.conf

36 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-08-02 19:40:39 -05:00
# Configuration for {{ grafana.url }}
2020-05-10 03:30:19 -05:00
# vim:ft=apache:
# Accept connections from non-SNI clients
SSLStrictSNIVHostCheck off
# Need this for SSL proxying, apparently
SSLProxyEngine on
# Website configuration
<VirtualHost *:80>
2020-08-02 19:40:39 -05:00
ServerName {{ grafana.url }}
Redirect permanent / https://{{ grafana.url }}
2020-05-10 03:30:19 -05:00
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
2020-08-02 19:40:39 -05:00
SSLCertificateFile /etc/pki/cert/crt/{{ grafana.url }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ grafana.url }}.key
SSLCertificateChainFile /etc/pki/cert/crt/{{ grafana.url }}-fullchain.crt
SSLProtocol {{ ssl_protocol }}
SSLCipherSuite {{ ssl_cipher_suite }}
2020-08-02 19:40:39 -05:00
ServerName {{ grafana.url }}
DocumentRoot {{ grafana.webroot }}
<Directory "{{ grafana.webroot }}">
2020-05-10 03:30:19 -05:00
Require all granted
AllowOverride All
Options MultiViews FollowSymlinks
</Directory>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://127.0.0.1:3001/ nocanon retry=1
ProxyPassReverse / https://127.0.0.1:3001/
RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on
</VirtualHost>