• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Multiple websites in one server

Good Day All,

I would just like to ask if anyone has come across this problem. I can already access my website found in my server. I am using windows 2003 server and I am using IIS. I have 1 IP address and by typing this IP address I can log into my website. I would like to know how to add another website that is found in the wwwroot folder. Do i need to have another IP address, another NIC card for this? I have already tried adding a IP address into the TCP/IP configuration of the NIC card. Please advise. Thank You

vncmrc12
0
vncmrc12
Asked:
vncmrc12
  • 5
  • 5
  • 3
1 Solution
 
mikeleebrlaCommented:
you can have as many websites as you would like using only one IP address.  To do this you have to use what is called "host headers"  These host headers tell IIS which website the user wants to go to on the same IP address. Read here for instructions for IIS 6.

http://www.visualwin.com/host-header/
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
Hi vncmrc12,

You can add as many web sites as you like using the "header" feature... and the files for them can be located most anywhere you like as well.  You need to either register additional domain names or you can create them as subdomains.  Your additional site should be in a separate folder... not necessarily in the wwwroot folder, it can actually be most anywhere on your server.  But it's best to just create a new folder under C:\Inetpub.

Open IIS Manager and click on "web sites" in the left column... then right click in an open area on the RIGHT side and select NEW > Web Site  to start the Wizard.  Enter the description and then on the next screen enter the Fully Qualified Domain Name in the "Host Header" box.  On the next screen put in the location of your new site (ie, C:\Inetpub\newsite\)... and you're basically done.

If you want to be able to access the site without registering a domain name, you can do so by putting the newsite folder IN the wwwroot and then the site will be available at http://IP.ADD.RE.SS/newsite --- you wouldn't use the host header field in this case.

The basics are here:  http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7918ab21-a3cc-436c-86d2-c303020d7231.mspx

Good Luck!

Jeff
TechSoEasy
0
 
vncmrc12Author Commented:
Hi all,

Thanks for that prompt replies. I have created the things you guys have asked me to do. I want to access that website. I can't seem to get in... say my ip is 203.187.87.90 what else do I have to put? Thanks

vncmrc12
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
mikeleebrlaCommented:
well you would have to register www.yourwebsite.com to point to that IP address.
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
As mentioned above... put your site in a FOLDER within wwwroot... something like C:\Inetpub\wwwroot\newsite\index.html

So then you run the New Site Wizard as also mentioned above but instead of creating a totally new site, you want to create a sub-site of "Default Web Site".  

So  in IIS Manager, expand Web Sites in the left column and then RIGHT CLICK on Default Web Site and select New > VIRTUAL DIRECTORY.  

Call your ALIAS "newsite" (for instance) then in the Path: you'll put C:\Inetpub\wwwroot\newsite  click Next and then Finish.  

Your site will now be available at http://203.187.87.90/newsite

Jeff
TechSoEasy
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
Note that you probably can't access this site this way from your server... instead use http://127.0.0.1/newsite.
0
 
vncmrc12Author Commented:
Hi Mikeleebrla,

Hi again,

How can I make the new website appear without using the 203.187.87.90 ip address. Say 203.187.87.90 is www.website1.com and I have my new website to be named www.website2.com. I know you have to register the www.website2.com name but won't it still point to the current IP which is 203.187.87.90? Please advise. THank You!

vncmrc12
0
 
vncmrc12Author Commented:
When I do the virtual directory its like the new website is inside the old website directory. THanks
0
 
mikeleebrlaCommented:
you dont need to do the new directory INSIDE of the other VD.  you need to create a whole new website from within IIS since it is a totally seperate website with its own dns name.

you also will need to register (if you haven't already) every website with a domain registrant.  all of the domains that you register will need to point to the same IP (the public IP of your www server).  you can have 100s of websites pointing to this one IP address.  you then may as, well if all the websites point to the same ip address, how does the server "know" which website to send to the person requesting the website??? the answer is the host header.  If you set up the host header for www.website1.com, the server will send www.website.com's content to the requestor.

BOTH www.website1.com AND www.website2.com have to have DNS records set up to point to 203.187.87.90.
0
 
vncmrc12Author Commented:
mikeleebrla,

I now understand, I will try what your saying. Now I get it :) I won't give the points out just yet but I am seing the light :) THanks pal..

vncmrc12
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
If you're confused about how the server will know the difference between www.website1.com and www.website2.com is where the HOST HEADERS come back in...

A user enters www.website1.com in their Internet browser which is translated by DNS into 203.187.87.90 to travel to your server.  When it gets to your server it gets translated BACK into www.website1.com so that the server knows where to send it.

Jeff
TechSoEasy
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
0
 
vncmrc12Author Commented:
Thanks to the both of you. I don't know how to split the points but both of your work did help me alot. Thanks again
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now