Setting up a web site on local machine using IISBy using IIS (Internet Information Services ) we can run a website in local computer. For this we have to configure our machine and mainly IIS to identify and run the website placed in a directory. We will not discuss about basic html for designing a site here and we will only discuss on how to configure and run website by using IIS.
IIS comes with Windows XP operating system and also with server operating system of Windows.
InstallationPlace all the files of the website ( developed ) in one directory. For the first time users it is better to store in c:\intput\wwwroot\ as this is the default home directory for IIS.
Opening IIS admin panelTo open IIS go to START and then to Control Panel. There will be a list of programs under the control panel and double click the program listed as Administrative Tools. Inside this Administrative Tools you can locate a Icon named as Internet Information Services (IIS) . If this Internet Information Service is not listed then you have install this by going to Add/Remove Windows Components inside the control panel. Double click the IIS and a new window like explorer will open up. You may need your windows install CD to get the components.
Configuration of IISExpand all the collapsible ( + ) symbols at the left to get the default website icon. Select this default Website and right click. Select the property link on the menu that appears. In the opened window many admin jobs for IIS can be done. We will only concentrate on setting up the site. Go to the tab ( at the top ) saying Home Directory. Here the directory where our website files are stored is to be marked as home directory. By default IIS keeps c:\Inetpub\wwwroot as the home directory. This path can be changed to any other location of the computer.
Opening the websiteThe website files are to be stored in the directory we setup as home directory in IIS configuration as explained above. To open the local site we have to use https://localhost/ or https://127.0.0.1/ in web browser to open the site. If our file name in the website is mysite.htm and is stored inside wwwroot and the complete path is like this c:\Inetpub\wwwroot\mysite.htm then to open this file we have to type https://127.0.0.1/mysite.htm or https://localhost/mysite.htm . By default if no file name is specified ( like https://127.0.0.1/ ) then the file name index.htm or default.htm will open. This setting of which file to open by default can be managed from IIS admin window.
This is how a website can be maintained in a local machine. For practice try changing default directory path and see how it can be pointed to different locations in local machine. We have not discussed how script execution like running an ASP or PHP script can be given at this website. We will try that in our next tutorial.
Read how to configure and run php on IIS
Installing PHP5 in IIS on Window platforms
This article is written by plus2net.com team.
Be the first to post comment on this article :