Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409410
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409488
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409549
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409568
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-409917
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/80638-virtual-host-ssl/#findComment-410018
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.