AuthPAM and forcing SSL

From Antiflux Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 00:01, 17 December 2006

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