Operating System - HP-UX
1825723 Members
2974 Online
109687 Solutions
New Discussion

One IP One Web Site, or One IP Multi Web Site?

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

One IP One Web Site, or One IP Multi Web Site?

Hi,

I would like to know what solution is better:

1) using one IP address for one web site, or

2) using one IP address for two web sites.

The condition is that there is only one NIC on the box.

Appreciated if someone comments it.

Steven
Steve
6 REPLIES 6
John Bolene
Honored Contributor
Solution

Re: One IP One Web Site, or One IP Multi Web Site?

Apache can be setup for multiple web sites on one IP. I have looked at the config and have not worked with it enough to get it to work.

The main domain name has to be the same and you are setting up sub domains.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Craig Rants
Honored Contributor

Re: One IP One Web Site, or One IP Multi Web Site?

Better in terms of what? That is probably an objective statement. Based on your limitation of 1 nic however, your only option is to host two sites on one nic, which is totally feasible, most sites do that already with a regular site on port 80 and the secure site on port 443. I don't think you would see a big network performance hit unless you allow big uploads or downloads throught the site.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jeffrey S. Sims
Trusted Contributor

Re: One IP One Web Site, or One IP Multi Web Site?

The way I do it is to use the ifalias command to add another ip to the box and configure it as a virtual host in apache. Its relatively simple to do.

Then you configure the domain name in your dns server.

Hope this helps.
Bill Hassell
Honored Contributor

Re: One IP One Web Site, or One IP Multi Web Site?

Depends on ytour goal. Are you looking for reliability in case of a failure, or increased performance?

In the case of failure, there are a lot more questions: how critical is this web site? The answer directly relates to how much you can invest in the project. You start with the net connection redundancy, perhaps even separate ISP connections. These would come into separate switches, then dual cables to from each switch to separate computers (4 lan connections). And the computers would be setup with MC Service Guard with dual access to common disks using redundant I/O paths.

For pure speed goals, start with the ISP conection. It makes no sense to use Gigabit links from your computer to a firewall that connects to the Internet using a T1 (apx 1.5 Mbit max) link. If you have plenty of network speed, look at auto-port aggregation to allow dual or even quad LAN cards to work in parallel using a single IP address. Your switch must also support APA. Using APA is a way to provide load balancing, assuming your web server can keep up with the load.

For more information about APA, go to docs.hp.com and search for: aggregation


Bill Hassell, sysadmin
Roger Baptiste
Honored Contributor

Re: One IP One Web Site, or One IP Multi Web Site?


Two is better than one; Even with one NIC card , i would say TWO ip address for two web sites makes since, simply because it allows you to shut off one IP without affecting the functioning of the other. For eg, if you want to shut off websiteA, all you would need is to turn of the ifconfig on that IP.

On 11.x , ifconfig by default has options to configure two IP addresses to a NIC using
the lanx:0 addressing option.

HTH
raj
Take it easy.

Re: One IP One Web Site, or One IP Multi Web Site?

Hi,

Doesn't really make any difference unless the customers wants an unique IP for their domain. As you are using one NIC card collisions or any network characterstic remains the same. So depnding upon the customer requirement use the policy. If the custmer doesn't insist on a unique IP, its good to save IP. and run both sites on same IP. Almost all of todays web servers support virtual hosting (multiple host on same IP one machine, multiple host on different IP one machine.)
Hope this answers your question

Manoj