Changes

From SME Server
Jump to navigationJump to search
174 bytes added ,  13:24, 14 September 2015
Line 101: Line 101:  
as a way to check for the module. The command returns "headers_module (shared)" if the header module is loaded.  
 
as a way to check for the module. The command returns "headers_module (shared)" if the header module is loaded.  
   −
Next, create a custom template to add the header directive. The custom template is placed in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/. Name the template file "04StrictTransportSecurity". This important as the file name also dictates the order of loading. Put the following directive in the file:
+
Next, create a custom template to add the header directive. This version adds the directive to all virtual hosts (aka iBays). As an aside, it would be better to apply this directive to only the virtual host for ownCloud. The custom template is placed in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/. Name the template file "04StrictTransportSecurity". This important as the file name also dictates the order of loading. Put the following directive in the file:
    
  ### added to support ownCloud 8 ###
 
  ### added to support ownCloud 8 ###
 
  Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
 
  Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
   −
You may test this approach by modifying the httpd.conf file directly, and adding the directive in the ServerAlias section. However, this will be overwritten when the server is updated or reconfigured.
+
{{Note box|You may test this approach by modifying the httpd.conf file directly, and adding the directive in the ServerAlias section. However, this will be overwritten when the server is updated or reconfigured.}}
    
With the template in place, upgrade and reboot the system.
 
With the template in place, upgrade and reboot the system.
82

edits

Navigation menu