HTTP to HTTPS redirect on virtual host on port 8080

HTTP to HTTPS redirect on virtual host on port 8080

am 29.06.2004 11:59:44 von Christopher McClan

Hi,

I'm currently running an Apache web server with Mod_SSL, and have the
following virtual host statement:



SSLEngine on
SSLCertificateFile /xx/xxx/xxx.crt
SSLCertificateKeyFile /xx/xxx/xxx.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

ServerName mywebserver
DocumentRoot /xxx/xxx/xxx/xxx

Options Indexes FollowSymLinks MultiViews +ExecCGI
Allow from all



If I connect using http, I get an Apache error stating that this an SSL
enabled server, and I should use https.

My question is, how do I get it to redirect from http to https? This seem=
s
easy enough if you aren't running a virtual server on a specific port and
just want to redirect to https for certain directories, but in this
configuration I've not been able to achieve this.

Thanks,

CIMLinux

____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org

Re: HTTP to HTTPS redirect on virtual host on port 8080

am 29.06.2004 12:48:40 von Matt Stevenson

--- Christopher McClan wrote:
> Hi,
>
> I'm currently running an Apache web server with
> Mod_SSL, and have the
> following virtual host statement:
>
>
>
> SSLEngine on
> SSLCertificateFile /xx/xxx/xxx.crt
> SSLCertificateKeyFile /xx/xxx/xxx.key
> SetEnvIf User-Agent ".*MSIE.*" nokeepalive
> ssl-unclean-shutdown
>

> ServerName mywebserver
> DocumentRoot /xxx/xxx/xxx/xxx
>
> Options Indexes FollowSymLinks MultiViews
> +ExecCGI
> Allow from all
>

>

>
> If I connect using http, I get an Apache error
> stating that this an SSL
> enabled server, and I should use https.
>
> My question is, how do I get it to redirect from
> http to https? This seems
> easy enough if you aren't running a virtual server
> on a specific port and
> just want to redirect to https for certain
> directories, but in this
> configuration I've not been able to achieve this.

You'll have to run another virtual server on another
port. Then redirect to your https server. You can't
run http/https on the same port. Suggest 8080 as http
and 8443 as https. Then ...

RewriteEngine On
RewriteLog "logs/rewrite.log"
RewriteLogLevel 0
RewriteRule ^/(.*) https://xxxx:8443/$1 [R=301,L]






__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
____________________________________________________________ __________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List modssl-users@modssl.org
Automated List Manager majordomo@modssl.org