You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by vi...@summerseas.com on 2003/07/24 21:38:43 UTC

[users@httpd] redirecting http:// to https://

Hello,

I have an apache 1.3.x server with ssl enabled and a
virtual server
listening on port 443 called webmail.summerseas.com.

https://webmail.summerseas.com works but
http://webmail.summerseas.com
gives me the default server which is www.summerseas.com.

How can I make http://webmail redirect to https://webmail ?

Thanks,
Vic



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] redirecting http:// to https://

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 25 Jul 2003 vic@summerseas.com wrote:
> > Create a new <VirtualHost> block for www.summerseas.com on port 80 and
> > include a "Redirect / https://webmail.sumerseas.com/".  If your existing
> > port 80 host is not a virtual host, you'll need to also add a
> > <virtualhost> block for that host and a NameVirtualHost * directive.
> >
> > Joshua.
> >
> Thanks Joshua,
>
> Sorry, if I use www.summerseas.com, I actually want www.summerseas.com.
> What I'm trying to force is the use of SSL for webmail even if I type http
> instead of https.

That was just a typo on my part -- you need to do a little extrapolation
;-)

To be more specific:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.summerseas.com
DocumentRoot /same/as/in/main/documentroot
</VirtualHost>

<VirtualHost *:80>
ServerName webmail.summerseas.com
Redirect / https://webmail.summerseas.com/
</VirtualHost>

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] redirecting http:// to https://

Posted by vi...@summerseas.com.
>
> On Thu, 24 Jul 2003 vic@summerseas.com wrote:
>
>> Hello,
>>
>> I have an apache 1.3.x server with ssl enabled and a
>> virtual server
>> listening on port 443 called webmail.summerseas.com.
>>
>> https://webmail.summerseas.com works but
>> http://webmail.summerseas.com
>> gives me the default server which is www.summerseas.com.
>>
>> How can I make http://webmail redirect to https://webmail ?
>
> Create a new <VirtualHost> block for www.summerseas.com on port 80 and
> include a "Redirect / https://webmail.sumerseas.com/".  If your existing
> port 80 host is not a virtual host, you'll need to also add a
> <virtualhost> block for that host and a NameVirtualHost * directive.
>
> Joshua.
>
Thanks Joshua,

Sorry, if I use www.summerseas.com, I actually want www.summerseas.com.
What I'm trying to force is the use of SSL for webmail even if I type http
instead of https.

Vic








---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] redirecting http:// to https://

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 24 Jul 2003 vic@summerseas.com wrote:

> Hello,
>
> I have an apache 1.3.x server with ssl enabled and a
> virtual server
> listening on port 443 called webmail.summerseas.com.
>
> https://webmail.summerseas.com works but
> http://webmail.summerseas.com
> gives me the default server which is www.summerseas.com.
>
> How can I make http://webmail redirect to https://webmail ?

Create a new <VirtualHost> block for www.summerseas.com on port 80 and
include a "Redirect / https://webmail.sumerseas.com/".  If your existing
port 80 host is not a virtual host, you'll need to also add a
<virtualhost> block for that host and a NameVirtualHost * directive.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] redirecting http:// to https://

Posted by Jeff Cohen <su...@gej-it.com>.
You must have the statement: VirtualHost *:80 and VirtualHost *:443 or
NameVirtualHost *:80 and NameVirtualHost *:443 in order to define between
the two different VirtualHosts settings otherwise you'll get the first Vhost
that is shown in your conf file.

All the best,
Jeff Cohen
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!



> -----Original Message-----
> From: vic@summerseas.com [mailto:vic@summerseas.com]
> Sent: Thursday, July 24, 2003 3:39 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] redirecting http:// to https://
> 
> Hello,
> 
> I have an apache 1.3.x server with ssl enabled and a
> virtual server
> listening on port 443 called webmail.summerseas.com.
> 
> https://webmail.summerseas.com works but
> http://webmail.summerseas.com
> gives me the default server which is www.summerseas.com.
> 
> How can I make http://webmail redirect to https://webmail ?
> 
> Thanks,
> Vic
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org