Jump to content

Apache:HSTS Header: Difference between revisions

From Wiki
Created page with " <VirtualHost *:443> ServerAdmin support@example.com ServerName www.example.com SSLEngine on SSLCertificateFile /path/to/www.example.com.cert SSLCertificateKeyFile /path/to/www.example.com.key […] <span style="color:#ff0000">Header always set Strict-Transport-Security "max-age=31536000 ; includeSubdomains;"</span> DocumentRoot /var/www/ </VirtualHost> ==Source== *[https://blog.matrixpost.net/using-http-strict-transport-security..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<VirtualHost *:443>
<syntaxhighlight lang="apache" line="1">
    ServerAdmin support@example.com
<VirtualHost *:443>
    ServerName www.example.com
    ServerAdmin support@example.com
    SSLEngine on
    ServerName www.example.com
    SSLCertificateFile /path/to/www.example.com.cert
    SSLEngine on
    SSLCertificateKeyFile /path/to/www.example.com.key
    SSLCertificateFile /path/to/www.example.com.cert
    […]
    SSLCertificateKeyFile /path/to/www.example.com.key
    <span style="color:#ff0000">Header always set Strict-Transport-Security "max-age=31536000 ; includeSubdomains;"</span>
    […]
    DocumentRoot /var/www/
    Header always set Strict-Transport-Security "max-age=31536000 ; includeSubdomains; preload"
</VirtualHost>
    DocumentRoot /var/www/
</VirtualHost>
</syntaxhighlight>


==Source==
==Source==
Line 14: Line 16:


[[Category:Server]]
[[Category:Server]]
[[Category:Security]]

Latest revision as of 15:14, 15 November 2022

<VirtualHost *:443>
    ServerAdmin support@example.com
    ServerName www.example.com
    SSLEngine on
    SSLCertificateFile /path/to/www.example.com.cert
    SSLCertificateKeyFile /path/to/www.example.com.key
    […]
    Header always set Strict-Transport-Security "max-age=31536000 ; includeSubdomains; preload"
    DocumentRoot /var/www/
</VirtualHost>

Source