DJMic Posted December 7, 2007 Share Posted December 7, 2007 Can anyone adivse how to properly setup virtual hosts and implementing SSL, I can only get SSL to work on my first virtual host folder in the list. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/ Share on other sites More sharing options...
beebum Posted December 7, 2007 Share Posted December 7, 2007 I was under the impression that you couldn't use SSL with virtual hosts. ??? Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-408994 Share on other sites More sharing options...
DJMic Posted December 7, 2007 Author Share Posted December 7, 2007 I have it working on the first one in the list I just need to set it up for and individual domain not my "root" Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409103 Share on other sites More sharing options...
beebum Posted December 7, 2007 Share Posted December 7, 2007 Actually that's what I meant. I should have been more clear. As far as I know, apache can only be aware of one SSL cert at a time and you need a different one for each host. At least that's the way I understand it do date. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409113 Share on other sites More sharing options...
DK_Sun Posted December 8, 2007 Share Posted December 8, 2007 You "can" host multiple SSL sites on an single Apache installation. But what you must bare in mind is that the SSL technology is designed to be secure. Thus it cannot be secure if a single IP address is using multiple SSL certificates. So what that means is that each SSL site that you host must have it's own IP address. So it's simple, well I haven't done it much in Apache, but basically each site that you want to host an SSL site on, you must give it it's own IP address. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409410 Share on other sites More sharing options...
beebum Posted December 8, 2007 Share Posted December 8, 2007 I guess this is where I'm really confused. I don't see how a single apache install can host more than one ip address. ??? Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409459 Share on other sites More sharing options...
DK_Sun Posted December 8, 2007 Share Posted December 8, 2007 When you set the Virtual Host for each virtual host, unstead of using <VirtualHost *:80> DocumentRoot C:\Blah ServerName www.blah.com </VirtualHost> You do this: <VirtualHost 192.168.1.2:443> DocumentRoot C:\BlahSSL ServerName secured.blah.com </VirtualHost> Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409488 Share on other sites More sharing options...
DJMic Posted December 8, 2007 Author Share Posted December 8, 2007 I noticed you used a "local network IP" is there any way of setting up virtual-hosts on a server using multiple IP's in this manner such as: <VirtualHost 192.168.1.2:443> DocumentRoot C:\www\fun ServerName fun.com </VirtualHost> <VirtualHost 192.168.1.3:443> DocumentRoot C:\www\boring ServerName boring.com </VirtualHost> <VirtualHost 192.168.1.4:443> DocumentRoot C:\www\money ServerName money.com </VirtualHost> If NOT after you buy more IP address from your internet provider how does one assign multiple IP address to 1 PC Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409549 Share on other sites More sharing options...
trq Posted December 8, 2007 Share Posted December 8, 2007 If NOT after you buy more IP address from your internet provider how does one assign multiple IP address to 1 PC You need multiple network interfaces (cards). One for each ip address / connection. When you say internet provider I assume you mean your hosting provider? If your hosting provider allows you to have multiple ip addresses they will set this up for you. Ihave done much the same thing on my vps which has 3 dedicated ip addresses, and 3 network interfaces. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409568 Share on other sites More sharing options...
DK_Sun Posted December 8, 2007 Share Posted December 8, 2007 I noticed you used a "local network IP" is there any way of setting up virtual-hosts on a server using multiple IP's in this manner such as: <VirtualHost 192.168.1.2:443> DocumentRoot C:\www\fun ServerName fun.com </VirtualHost> <VirtualHost 192.168.1.3:443> DocumentRoot C:\www\boring ServerName boring.com </VirtualHost> <VirtualHost 192.168.1.4:443> DocumentRoot C:\www\money ServerName money.com </VirtualHost> If NOT after you buy more IP address from your internet provider how does one assign multiple IP address to 1 PC I used "local" IP addresses just as a reference, but they can be whatever IP address your server has configured and is listening too. If NOT after you buy more IP address from your internet provider how does one assign multiple IP address to 1 PC You need multiple network interfaces (cards). One for each ip address / connection. When you say internet provider I assume you mean your hosting provider? If your hosting provider allows you to have multiple ip addresses they will set this up for you. Ihave done much the same thing on my vps which has 3 dedicated ip addresses, and 3 network interfaces. Not always true. If you notice on your VPS host, the network adaptor will say "vmnet0" or something along those lines. You DO NOT need multiple network cards to have multiple IP addresses. Eg on Windows you can configure multiple IP addresses onto a single network card. I'm not too sure on UNIX though, but you could just Google that. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409917 Share on other sites More sharing options...
trq Posted December 8, 2007 Share Posted December 8, 2007 Actually you are correct. On my VPS, my 3 ips seam to be some sort of virtual network interfaces, all comming off the one venet0 card. lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:73748 errors:0 dropped:0 overruns:0 frame:0 TX packets:52779 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:43243420 (41.2 MiB) TX bytes:7753278 (7.3 MiB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:***.***.***.*** P-t-P:***.***.***.*** Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:***.***.***.*** P-t-P:***.***.***.*** Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 venet0:2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:***.***.***.*** P-t-P:***.***.***.*** Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 I'm aware that the whole thing is virtual using a vps anyway, but it seems this setup would be available though an actual machine as well. I'm not sure how you set it up though, more than likely through the route command I should imagine. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-410018 Share on other sites More sharing options...
DK_Sun Posted December 9, 2007 Share Posted December 9, 2007 Yeah, I'm not too sure myself as I am not a Linux guru. But it would just be through a Standard Configuration of your network interface card. Just try googling it. You're sure to find something. Quote Link to comment https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-410180 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.