[olug] apache w/ mod_ssl, http on 80 and https on 443?

Brian Wiese bwiese at cotse.com
Sun Sep 28 06:16:06 UTC 2003


On Sat, 27 Sep 2003 22:51:28 -0500
Daniel Pfile <daniel at pfile.net> wrote:

|Brian Wiese wrote:
|
|> is that possible?  I'm having the darnest config with apache w/
|> mod_ssl... it seems SSL is an all or nothing game.  Can one configure a
|> regular apache server to listen to both HTTP on port 80 and HTTPS on
|> port 443 at the same time?
|> 
|> Doesn't eem so for me, don't know why... here's some sample config...
|> any ideas?  Do I need to run 2 seperate apache servers, one to listen
|> HTTP on port 80 and one to listen HTTPS on port 443?
|> 
|> Thanks... (I've had this problem before, but got annoyed at running 2
|> apaches I guess)
|> 
|
|Wrap your generic ssl config stuff in an <ifmodule mod_ssl.c>. Stuff 
|like session cache, mutex, seeds, passphrase dialog, etc. Then create a 
|virtualhost for ssl. You can run it on the same IP you use for the main 
|server. Something like:
|
|<Virtualhost your.ip.addy:443>
|# normal vhost type stuff, if you want it, read the docs.
|SSLEngine On
|SSLCertificateFile    /path/to/ssl.crt/server.crt
|SSLCertificateKeyFile /path/to/ssl.key/server.key
|SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|</VirtualHost>
|
|Hope that gets you pointed in the right direction. Read apache's docs, 
|they're pretty good.
|
|-- Daniel

So yeah, I just came across the statement I was looking for in the mod_ssl
docs...-------
Is it possible to provide HTTP and HTTPS with a single server?    [L]

Yes, HTTP and HTTPS use different server ports, so there is no direct
conflict between them. Either run two separate server instances (one binds
to port 80, the other to port 443) or even use Apache's elegant virtual
hosting facility where you can easily create two virtual servers which
Apache dispatches: one responding to port 80 and speaking HTTP and one
responding to port 443 speaking HTTPS. -------

I was planning on doing SSL in a virtual host next, but was hoping that
wouldn't be required.  I'll give the virtual hosts a try, but has anyone
done HTTP and HTTPS on the same apache server w/o virtual hosts?

peace, cheers

 Brian Wiese | bwiese(at)cotse.com | aim: unolinuxguru
-------------------------------------------------------
  GnuPG/PGP key 0x2FD6AF16 | "FREEDOM!" - Braveheart 
------------------------------------------------------- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


More information about the OLUG mailing list