On Wed, Jun 30, 2004 at 02:34:44PM -0400, Derek T. Yarnell alleged:
> What is the easiest way to redirect a whole apache web site to the
> https url. We do it in one way by running two seppart apache instances
> and in the non-ssl one we just redirect to the SSL one.
>
> Is there an easier way to tell in the main httpd.conf file to say
> something like
>
> <IfDefine !SSL>
> Redirect / https://jaundiced.csic.umd.edu
> </IfDefine>
I played with this myself last year. I'm not an apache master so it took
awhile. I think this solution is kind of silly, but it actually works really
really well.
In the event that SSL isn't used or HTTP_HOST is not correct, error to the correct URL.
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
SSLRequireSSL
SSLRequire (%{HTTP_HOST} == "hpc.usc.edu")
ErrorDocument 403 https://hpc.usc.edu/nagios/
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
--
Garrick Staples, Linux/HPCC Administrator
University of Southern California
Attachment:
pgp00026.pgp
Description: PGP signature