Use HSTS in apache conf. Fixes #47.

This commit is contained in:
James Valleroy 2013-11-28 00:52:18 +00:00
parent 0ec794aaa7
commit 96310b4366
2 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,7 @@ apache-config: apache-install apache-ssl
apache-ssl: apache-ssl:
make-ssl-cert generate-default-snakeoil make-ssl-cert generate-default-snakeoil
a2enmod ssl a2enmod ssl
a2enmod headers
a2enmod rewrite a2enmod rewrite
a2enmod proxy a2enmod proxy
a2enmod proxy_http a2enmod proxy_http

View File

@ -21,6 +21,9 @@
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
## Use HTTP Strict Transport Security to force client to use secure connections only
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
## Shared options. ## Shared options.
ProxyPreserveHost on ProxyPreserveHost on
DocumentRoot /usr/share/plinth DocumentRoot /usr/share/plinth