Solved

2 websites hosted on premise

Posted on 2016-10-03
6
47 Views
Last Modified: 2016-10-13
I have 2 webistes hosted on-premise. Can I point to both of them using the same outside IP, or would each require their own IP address?
0
Comment
Question by:Philip Thomas
6 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 41827350
Simple answer, they each need their own IP address.

More complex answer, if you don't mind specifying a port number on one of them (http://host1.domain.com and then http://host2.domain.com:81) and your firewall can do port mapping, then you can share IP address.  If you had a layer 7 load balancer or a reverse proxy server, you could also share an IP address and the balancer can send to the correct host based on the host name.
0
 
LVL 27

Expert Comment

by:Dr. Klahn
ID: 41827386
Using Apache,as many sites as you wish can be hosted on one IP address using the VirtualHost option.  Incoming HTTP requests are sorted by the web site name in the request header, and then "routed" to the correct vhost.

Note that there are a few restrictions associated with this.  One is that all sites must be running in the same server process, and the other is that if secure HTTP is used, the use of HTTPS must be uniform across all vhosts.

NameVirtualHost *:80
# This VirtualHost is used for requests with no server name.
<VirtualHost *:80>
DocumentRoot /www/localhost
#                    (www).example1.com
<VirtualHost *:80>
ServerName www.example1.com
ServerAlias example1.* www.example1.*
UseCanonicalName on
DocumentRoot /www/example1
</VirtualHost>
#                    (www).example2.com
<VirtualHost *:80>
ServerName www.example2.com
ServerAlias example2.* www.example2.*
UseCanonicalName on
DocumentRoot /www/example2
</VirtualHost>

Open in new window

1
 
LVL 57

Expert Comment

by:giltjr
ID: 41827394
If you are using IIS (which you imply that you are) IIS calls Virtual Hosts Host Headers.  This only works if both sites are hosted on the same IIS Server.  I was assuming that you had 2 separate IIS servers.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 27

Expert Comment

by:Dan McFadden
ID: 41827527
You can host hundreds of sites on a single IP is you specifically binding all sites to the same IP address AND you must then use the host names fields on each site binding.  The host name must match the FQDN that is resolvable in DNS.

Dan
0
 

Author Comment

by:Philip Thomas
ID: 41827958
Yes, both sites are on the same IIS server.
0
 
LVL 27

Accepted Solution

by:
Dan McFadden earned 500 total points
ID: 41827970
So, very easy to setup.


1. In DNS, make sure that each website has a resolvable Full Qualified Domain Name  (FQDN/URL) that points to the single IP on the server.

For Example:
Server IP = 1.2.3.4
Website A Name = www.domainA.com
Website B Name = www.domainB.com

In DNS, under domainA.com, there should be (at least) an A Record that point www to 1.2.3.4.  So when you do an NSLOOKUP, you should resolve www.domainA.com to 1.2.3.4 or you should resolve 1.2.3.4 to www.domainA.com.  This is the same for domainB.com.

2. On the binding for each site, specifically choose the IP Address from step 1, and fill out the Host Name field to match the FQDNs that are resolvable in DNS.

Dan
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
assignment of laptops - risks 6 85
Why isn't my network passing a certain vlan. 24 45
Visio Crashes when Running from a Share 6 42
DFS replication issue 7 19
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question