Changes

From SME Server
Jump to navigationJump to search
687 bytes added ,  18:14, 11 November 2013
Line 54: Line 54:  
  }
 
  }
 
  }
 
  }
 +
 +
Save the file & exit by Ctrl+x, then issue the following command
 +
 +
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
   −
Or this is an alternative if the solution above doesn't work.
+
sv t /service/httpd-e-smith/
 +
 
 +
* This is an alternative if the solution above doesn't work.
    
  {
 
  {
Line 69: Line 75:  
  }
 
  }
 
  }
 
  }
 +
    
Save the file & exit by Ctrl+x, then issue the following command  
 
Save the file & exit by Ctrl+x, then issue the following command  
Line 77: Line 84:       −
If you wish to force https access to other ibays then make additional template fragments with a different filename that contain the same code except with the ibay name changed to suit
+
* If you wish to force https access to other ibays then make additional template fragments with a different filename that contain the same code except with the ibay name changed to suit
    
eg
 
eg
    
61redir-ibayname2
 
61redir-ibayname2
 +
 +
* Alternatively if you want to force all http trafics to https, you can make a general rule like this.
 +
 +
60all-httptohttps
 +
 +
{
 +
if ($port ne "443")
 +
{
 +
$OUT .= <<'HERE';
 +
# Redirect transmission Address to Secure Address
 +
RewriteEngine On
 +
RewriteCond %{HTTPS} off
 +
RewriteRule (.*) <nowiki>https://%{HTTP_HOST}%{REQUEST_URI}</nowiki>
 +
## End Of Redirect
 +
HERE
 +
}
 +
}
 +
 +
Save the file & exit by Ctrl+x, then issue the following command
 +
 +
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
 +
 +
sv t /service/httpd-e-smith/
 +
    
Warning: If you receive errors when you expand the template that refer to not finding HERE before EOF, then make sure you have no spaces before or after the HERE entry in the code
 
Warning: If you receive errors when you expand the template that refer to not finding HERE before EOF, then make sure you have no spaces before or after the HERE entry in the code

Navigation menu