[SATLUG] Apache with 1 IP, two SSL sites, different ports

Jeremy Mann jeremymann at gmail.com
Thu May 21 09:42:24 CDT 2009


On Wed, May 20, 2009 at 3:59 PM, Gabriel Doss <gabriel.doss at gmail.com> wrote:
> I am trying to get apache-2.2 to serve three sites, one http and two https
> with separate self-signed certs. I know apache requires different ports for
> all three since two are SSL and cannot share a same IP/same port
> configuration like http traffic can.

Gabriel, this is false. I run a webserver here at the HSC that serves
up various domains and 4 HTTPS sites concurrently. 3 of the HTTPS
sites are the same IP and 1 is on a dedicated IP.

Here is how I have it (domains and IP are removed)

CentOS5 (Apache 2.1)
/etc/httpd/conf.d/ssl.conf

NameVirtualHost x.x.x.x:443

<VirtualHost x.x.x.x:443>
DocumentRoot /home/www/xxxxxx
Servername xxxxxxxxx.uthscsa.edu
ServerAdmin jeremy at xxxxxx.uthscsa.edu
SSLEngine On
SSLCertificateFile /etc/httpd/xxxxx/xxxxx.crt
SSLCertificateKeyFile /etc/httpd/xxxxxx/xxxxx.key
</VirtualHost>

Repeat for as many https domains you need and restart Apache


-- 
Jeremy Mann
jeremy at biochem.uthscsa.edu

University of Texas Health Science Center
Bioinformatics Core Facility
http://www.bioinformatics.uthscsa.edu
Phone: (210) 567-2672


More information about the SATLUG mailing list