11/12 Anyone ever successfully used the mod-ssl directive SSLRequire
(not to be confused with SSLRequireSSL)? I'd like to use it to
require ssl to access resources that use Basic or Digest
authentication. Something along the lines of:
SSLRequire %{AUTH_TYPE} eq "Basic" or %{AUTH_TYPE} eq "Digest"
Alternatively:
SSLRequire %{AUTH_TYPE} ne ""
Unfortunately the SSLRequire doesn't appear to work *at all*,
even for simple cases like:
SSLRequire 2 < 1
Suggestions? Is there a simpler way to accomplish the above?
The alternative of requiring that SSLRequireSSL directives be
sprinkled into every .htaccess file that specifies AuthType is lame
and unmaintainable. -dans
\_ A more useful answer than doing SSLRequire is to do a Redirect
to the same URL but https:// in each situation. Two caveats:
1) this still doesn't solve the logic problem (if AUTH_TYPE ...)
2) you _can't_ do this in .htaccess, it has to be in the httpd.conf
in a <Directory> or <Location> tag. If you put it in the
.htaccess, it will try to do the redirect _after_ the basic auth
<DEAD>..com<DEAD>e to think of it, you may be having the same problem w/
your SSLRequire; try putting it in the httpd.conf --dbushong
\_ I've actually done this in the past, and it is a nice way
to smooth over a user-unfriendly Forbidden message.
Unfortunately it suffers from the same maintainability
problems as teh sprinkling SSLRequireSSL statements
everywhere :(. As for SSLRequire, I haven't been able to
get it to work properly anywhere, either httpd.conf or
.htaccess. Thanks for the response. -dans |