AuthPAM and forcing SSL

From Antiflux Wiki

Revision as of 19:06, 29 September 2007 by Tim (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Here's an easy way to force SSL for a page. Just put this in a .htaccess file in the directory you want to SSL protect.

 SSLOptions +StrictRequire
 SSLRequireSSL
 ErrorDocument 403 https://antiflux.org/path/to/whatever

The 403 redirect isn't perfect because people could be denied access for reasons other than attempting non-SSL access, but it works and it's very easy. SSL is essential when using AuthPAM to authenticate system accounts.

 AuthPAM_Enabled On
 AuthType Basic
 AuthName "secure area"
 require valid-user

References

Personal tools