Solved

IIS7 Virtual Hosts and server wide Virtual Directories.

Posted on 2009-04-01
7
2,491 Views
Last Modified: 2012-05-06
Hello.

Moving from Sambar Server on XP to IIS7 on Server 2008.

Sambar supported the following 2 mechanisms.

1 - I can have any number of websites using the same IP address.

I use DNS to map the name of the site to Sambar Server. Sambar Server has a vhosts.ini file which joins the website name (test.salesops.domain.local for example) to its particular set of files (D:\WebSites\Test\SalesOps\public_html for example).

2 - I can create system wide virtual directories.

This allows me to create a store for shared resources - css, js, graphics, sound, etc. without having to have copies in every web site.


I am a total novice with IIS7. I've managed to get IIS7 working and PHP installed using FastCGI.

I now want to move my existing sites.

The DNS records are pointing to the new server and I'm ready to start copying the sites.

My problem is one of terminology (what does Microsoft call these facilities) and knowledge of IIS (I don't know if IIS supports these facilities).

Regards,

Richard Quadling.
0
Comment
Question by:Richard Quadling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 6

Expert Comment

by:powercram
ID: 24061818
Richard,

The answer to your first question is yes.  Previously this feature in IIS was called "host headers" (I include this so you can have a point of reference in case your run into it anywhere).  Now in IIS7 it's called "site bindings."  You can access this for any given site with a right-mouse click and select site bindings.  From there it should be self explanatory.

Regarding Q2 you can certainly share a physical directory among multiple sites as a virtual directory within each site.  It's easy to do manually as long as you don't have to do it for too many sites.  In IIS6 and earlier there was an easy way to export the settings of a virtual directory (or whole site), then you could import that on subsequent sites, but I'm not sure how to do that in IIS7.

Hope this helps.
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 24064588
Thanks for part 1. I'll look into this on Monday when I'm back in the office.

For part 2. As long as I've only got 1 instance of the common resources, I'm not too concerned over "difficulty". I expect that I can edit the config files to quickly replicate the settings (C:\windows\system32\inetsrv\config I think it was in).

All the files for the sites will be within subfolders of C:\WebSites

So, ...

C:\WebSites\Common will be the global resource folder, containing
C:\WebSites\Common\audio
C:\WebSites\Common\CSS
C:\WebSites\Common\JS (with sub folders for prototype, scripty, calendar, gui and my own JS code)
C:\WebSites\Common\images

Then each site will be ...

C:\WebSites\SalesOps
C:\WebSites\Merlin
C:\WebSites\Accounts
C:\WebSites\Phones

Each of these will have a public_html folder and a local_includes folder.

The public_html folder is the doc_root for that site.

The local_includes folder is not publicly accessible from the web but is used by scripts running within that site.

Still learning about IIS. Don't need a lot of it's capabilities at the moment.
 
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 24076763
Host Headers.

So create my sites and then bind  the name to each site.

Makes sense.


0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 6

Expert Comment

by:powercram
ID: 24076909
FKA (formerly known as) host headers.  They are now called site bindings.
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 24324639
In the end I found that the server config was held in an XML file.

This was a LOT easier to use than I was expecting and allows me to clone a site setup very easily.

And adding a global virtual directory was very easy.

Below is a snippet of the applicationHost.config file.

As you can see adding the "/global" path is a 1 liner.
<site name="Sales Operations" id="2" serverAutoStart="true">
	<application path="/" applicationPool="No .NET">
		<virtualDirectory path="/" physicalPath="D:\Web Sites\Development\Sales Operations\public_html" />
		<virtualDirectory path="/global" physicalPath="D:\Web Sites\All Sites" />
	</application>
	<bindings>
		<binding protocol="http" bindingInformation="*:80:dev.salesops.domain.local" />
	</bindings>
</site>
<site name="Accounts Department" id="3" serverAutoStart="true">
	<application path="/" applicationPool="No .NET">
		<virtualDirectory path="/" physicalPath="D:\Web Sites\Development\Accounts Department\public_html" />
		<virtualDirectory path="/global" physicalPath="D:\Web Sites\All Sites" />
	</application>
	<bindings>
		<binding protocol="http" bindingInformation="*:80:dev.accounts.domain.local" />
	</bindings>
</site>

Open in new window

0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 24362188
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 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