Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


force_https_ssl_by_directory_with_httpd.conf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

force_https_ssl_by_directory_with_httpd.conf [2008/08/04 14:51] (current)
juckins created
Line 1: Line 1:
 +edit /etc/httpd/conf/httpd.conf
  
 +<code>
 +# Force <DIR> to use SSL
 +RewriteEngine on
 +RewriteCond   %{SERVER_PORT}  !^443$
 +RewriteRule ^/<DIR>(.*)$ https://%{HTTP_HOST}/<DIR>$1 [L,R]
 +</code>
 +
 +Example:
 +<code>
 +# Force Nagios to use SSL
 +RewriteEngine on
 +RewriteCond   %{SERVER_PORT}  !^443$
 +RewriteRule ^/nagios(.*)$ https://%{HTTP_HOST}/nagios$1 [L,R]
 +</code>
force_https_ssl_by_directory_with_httpd.conf.txt ยท Last modified: 2008/08/04 14:51 by juckins