how to setup ssl on a virtual site

Support for webhosts that use CentOS
Post Reply
brianstorm
Posts: 23
Joined: 2006/01/06 14:23:30

how to setup ssl on a virtual site

Post by brianstorm » 2006/07/20 13:51:17

Hi,

I have a centos4 server running virtual sites. At the moment the ssl is setup on the IP address, I'd like to enable a virtual site to use ssl too. Can anyone advise me as to how I might achieve this?


Many thanks for your time.

Cheers

Brian

foxb
Posts: 1924
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: how to setup ssl on a virtual site

Post by foxb » 2006/07/20 14:27:10

You cannot use ssl and virtual sites with one IP ---> ssl protocol limitation

brianstorm
Posts: 23
Joined: 2006/01/06 14:23:30

Re: how to setup ssl on a virtual site

Post by brianstorm » 2006/07/24 12:13:26

I know this, but I also know that there is a workaround which I have had in place previously (although i didn't set it up) which used a symbolic link to redirect the url.

I think that the config file of the shop had a https: url of the https root with a folder name corresponding to the site. There was then an symbolic link setup to refer any request to https://84.234.17.86/renegade to the http://www.renegade.co.uk folder but using the ssl encryption.

I have read it is easy to setup but can't find eactly how to do it....If anyone has any pointers they'd be greatfully received.

Thanks


Brian

brianstorm
Posts: 23
Joined: 2006/01/06 14:23:30

Re: how to setup ssl on a virtual site

Post by brianstorm » 2006/08/08 21:36:59

For anyone stuck who finds this I thought I'd post my findings....

I eventually had to reinstall apache & its modules (mod_ssl included) to get my ssl working again... to access a virtual site using https (having setup an https server listening on port 443) I created a folder in my https:// server web root called "my-link-folder" or whatever makes sense... I then created a redirect (I did this using webmins redirect function) from that folder to the virtual site. The virtual site shop configuration files were then set to use the https://www.mysecuredomain.com/my-link-folder/ as an https connection which seems to work

Problem: I want to password protect a directory and can't when it is accessed securely - still working on that.

I believe that the same thing can be achieved using an symbolic link (i think its different)

Also, I have read that its is possible to run more than 1 secure server & certificate by adding a second server using ssl on a different port number. Not tried this yet but it sounds interesting enough to be useful to someone....

foxb
Posts: 1924
Joined: 2006/04/20 19:03:33
Location: Montreal/QC

Re: how to setup ssl on a virtual site

Post by foxb » 2006/08/09 14:00:44

Are you able to set different certificates for each web site?

rayman
Posts: 45
Joined: 2006/08/05 06:14:15
Contact:

Re: how to setup ssl on a virtual site

Post by rayman » 2006/09/21 22:23:51

have you tryed seting virual ip addresses to get different ip and therefore get different ssl certs..? just a thought not tryed it but it might work to create virtual ip try this

DO THIS:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

TOGET SOMETHING LIKE THIS


DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:46:19:D3
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

write it down but
DON@T CHANGE IT

then do this

vi /etc/sysconfig/network-scripts/ifcfg-eth0:0

and create this "using your addresses of course"

DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.101
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

then restart network like this

/etc/init.d/network restart

you should the have 2 ip addresses 192.168.0.100 and 192.168.0.101
assign your virual hosts to each address and you should be sorted but as i said not 100% sure about the certifactes though

hope it works but if not hope ifts of use to some one personally I'm trying to get get it to run 2 dns from same machine but keep getting side tracked on forums :-D

Post Reply

Return to “CentOS 4 - Webhosting Support”