httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peters, Michael D." <Michael.Pet...@acbl.net>
Subject RE: [users@httpd] Forcing SSL?
Date Mon, 18 Aug 2003 18:10:16 GMT
Thanks,

I'll try that. That seems better than just not listening on 80.

Best regards,

Michael D. Peters 



-----Original Message-----
From: Leif W [mailto:warp-9.9@usa.net]
Sent: Monday, August 18, 2003 1:55 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Forcing SSL?


----- Begin Original Message ----- 
From: Peters, Michael D.
To: Users@Httpd. Apache. Org (E-mail)
Sent: Monday, August 18, 2003 1:32 PM
Subject: [users@httpd] Forcing SSL?


What is the recommended method of forcing only https connections?
Best regards,
Michael D. Peters
----- End Original Message ----- 

Hello,

Please send future messages as plain text, as most users dislike them and it
may munge the web-archives or something.

I'm not sure if this is the best way, but I've used a permanent redirect on
my test site.  Set up a virtual host listening on port 80 to catch and log
http requests, and do a permanent redirect to https.  See EXAMPLE 1 below.
This seems to also automagically tack on anything after the / , see EXAMPLE
2 below.  Hope this helps, and if anything I say is incorrect or not
recommended, I'm sure someone(s?) will point that out and offer an
alternative(s).

Leif

================
EXAMPLE 1
================

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName www.site1.net
    # ServerAdmin, Log declarations
    RedirectPermanent / https://www.site1.net/
</VirtualHost>

<IfDefine SSL>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
    ServerName www.site1.net
    # ServerAdmin, Logs, DocumentRoot, Directory
    # SSL specific options copied from the ssl.conf
</VirtualHost>

================
EXAMPLE 2
================

URL typed in browser or referenced by a page:

    http://www.site1.net/

(apache tells the browser to permanently redirect to the https site)

URL now visible in browser:
    https://www.site1.net/

URL typed in browser or referenced by a page:

    http://www.site1.net/some/path/to/page.php

(apache tells the browser to permanently redirect to the https site)

URL now visible in browser:

    https://www.site1.net/some/path/to/page.php




---------------------------------------------------------------------
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


Mime
View raw message