L'ensemble des scripts et bibliothèques bash utilisés pour maintenir l'infrastructure du Tetalab. Ce socle Bash est une version légère et adaptée du socle Bash essentiellement développé par Emmanuel Confrère, éminent DBA Calédonien.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

36 lines
1.4 KiB

<VirtualHost 192.168.122.42:80>
# ReverseProxy with https redirect template
#
# Written by Doug Le Tough
#
# Usage:
# sed -s 's/SITE_NAME/example.com/g' site_template.conf > example.org.conf
# sed -i 's/SITE_HOST/hostname.local.tetalab.org/g' example.org.conf
#
Define FQDN SITE_NAME
Define HOST SITE_HOST
Define HOST_PORT SITE_PORT
ServerName ${FQDN}
### All HTTP requests are converted to HTTPS requests
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
ErrorLog "/var/log/httpd/${FQDN}_error.log"
CustomLog "/var/log/httpd/${FQDN}_access.log" Combined
</VirtualHost>
<VirtualHost 192.168.122.42:443>
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
ServerName ${FQDN}
ProxyPreserveHost On
SSLEngine on
SSLCertificateFile /etc/dehydrated/certs/${FQDN}/cert.pem
SSLCertificateKeyFile /etc/dehydrated/certs/${FQDN}/privkey.pem
SSLCertificateChainFile /etc/dehydrated/certs/${FQDN}/fullchain.pem
RequestHeader set X_FORWARDED_PROTO 'https'
ProxyPass / http://${HOST}:${HOST_PORT}/
ProxyPassReverse / http://${HOST}:${HOST_PORT}/
ErrorLog "/var/log/httpd/${FQDN}_error.log"
CustomLog "/var/log/httpd/${FQDN}_access.log" Combined
</VirtualHost>