Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


force_https_ssl_by_directory_with_httpd.conf
no way to compare when less than two revisions

Differences

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


force_https_ssl_by_directory_with_httpd.conf [2008/08/04 14:51] (current) – created juckins
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