ansible-role-keycloak/templates/apache-ssl.conf.j2

32 lines
1.1 KiB
Django/Jinja

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerName {{ inventory_hostname }}
ServerAdmin webmaster@{{ inventory_hostname }}
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/{{ inventory_hostname }}.error.log
CustomLog ${APACHE_LOG_DIR}/{{ inventory_hostname }}.access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/{{ inventory_hostname }}.pem
SSLCertificateKeyFile /etc/ssl/private/{{ inventory_hostname }}.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
ProxyPreserveHost On
SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
</IfModule>