You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Wick, Daniel" <DP...@Mail.Donaldson.com> on 2004/01/20 18:04:49 UTC

RE: [users@httpd] Automatically Having An SSL Connection To A Web Site

Andrew,

If you use http:// and port 80, you don't need a port number in the url.
Also, if you use https:// and port 443, you don't need a port number in the
url.  These are two standard ports for http. and https.

If you wish to redirect users from 80 to 443, you can do it in your virtual
host setup like this:

<VirtualHost 555.555.555.55:80>
	ServerName foo.com
	ServerAdmin webmaster@foo.com
	DocumentRoot /path/to/root/
	Redirect / https://foo.com/


Then just set up another vhost for the ssl site, like this:

<VirtualHost 555.555.555.55:443>
	ServerName foo.com
	ServerAdmin webmaster@foo.com
	DocumentRoot /path/to/root/

	SSLEngine on
	SSLCertificateFile /path
	SSLCertificateKeyFile /path
	SSLCertificateChainFile /path
	SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

You could also configure your network to push port 80 requests to 443.  I
prefer the vhost method, as it is more flexible.

--Dan


> -----Original Message-----
> From: Kaplan, Andrew H. [mailto:AHKAPLAN@PARTNERS.ORG]
> Sent: Tuesday, January 20, 2004 10:51 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Automatically Having An SSL Connection To A Web
> Site
> 
> 
> Hi there --
> 
> I set up a server running 1.3.29 with mod_ssl. What I am 
> looking to do is to
> configure
> the box so that when a user accesses it, the browser will 
> automatically use SSL.
> 
> The first thing that I am planning to do is to have the 
> server listen to only
> port 443.
> I need to set up a link so that when a user accesses the 
> server, he/she will
> automatically 
> be redirected to the correct port. What I don't want is to 
> have the user need to
> include
> the port when typing in the URL. 
> 
> What is the best way to do this?
> 
> 
> 
> ---------------------------------------------------------------------
> 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