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

How do I use folders to define websites?

I want to host several websites on my local machine. So I have created multiple folders under wwwroot for each site. For example:
 
wwwroot/site1
wwwroot/site2

Now when I hit the url www.site1.com I get the index.html under wwwroot not under wwwroot/site1. How do I do that? Or am I on he wrong track here.
0
sclarkny
Asked:
sclarkny
  • 3
  • 2
1 Solution
 
geowrianCommented:
I'm assuming you are using IIS as the web server. If so, open the Internet Information Services Manager, expand "Sites", and create a new site. Then point it at each of those folders.

See: https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=776 (IIS 6)
http://technet.microsoft.com/en-us/library/cc772350%28v=ws.10%29.aspx (IIS 7)
0
 
Jagadishwor DulalBraces MediaCommented:
That is correct the web should not show you the root directory. As you mention it is correct wwwroot/site1 is www.site1.com why you need wwwroot there it have been managed by domain name which look for the root folder and your root is site1 so it retrieve file index.html and show to your user. Similarly second site is www.site2.com and others.
0
 
sclarknyAuthor Commented:
geowrian:

how do I do this using Win 7 Pro?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
geowrianCommented:
Can you please confirm you are running IIS 7? If so:

1) Open IIS Manager (see: http://technet.microsoft.com/en-us/library/cc770472%28v=ws.10%29.aspx)
2) Right-click on "Sites" and choose "Add New Site"
3) Enter a name for the website.
4) You can use the default Application Pool (unless you have a need to use another one or create a new one)
5) Choose the folder for site1 when prompted for the Physical path
6) You can use "All unassigned" for the IP Address
7) I would suggest either using port 80 and a different host header for each site. Enter the domain name as the Host Header. For example, "www.site1.com" for site1. NOTE: Your DNS will have to point wwww.site1.com to your computer's IP. Alternatively, you can set this in your hosts file on your PC (but the website will only work on your PC).
8) Choose Start Web site immediately
9) Repeat for site2
0
 
sclarknyAuthor Commented:
I am running IIS7
0
 
geowrianCommented:
The instructions above should work fine, then. So should the second link in my earlier posting. Let us know how it works out.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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