How to Setup a Basic Website in IIS for the Beginner
>> 1: – Remote Desktop
I am not going to spend a lot of time on this, as it’s a fairly basic step. There is a program called Remote Desktop which is installed on all Vista and Server Machines that allow you to login to a remote machine and control it as if it was your regular desktop PC. If you are Mac user you can download Remote Desktop from the Microsoft Website.
>> 2: – Creating a New Site
You will need to click on the start menu and choose the Administrator Tools menu, then choose Internet Information Services (IIS). This is the primary application used to manage and control all the sites on your server.
Once you have launched IIS, you should see an icon on the left hand side that represents your server. It will be named the name of your server, probably some combination of numbers and letters. By clicking the Expand Icon, you can open the menu and reveal a folder icon called Sites. By expanding the folder icon you will then see a Default Web Site icon.
For the purposes of this examples we are going to leave the Default Web Site alone for now. Below is a step by step example of how to create your new site.
1. Right Click on the Sites Folder and Choose “Add New Site”
2. Give the Site a Name – Typically name the site the domain name, although you can name it anything like: mytestsite.com
3. Next you will need to assign a physical path to the folder on the computer to host the site files. As a general practice I usually always put these in the InetPub folder under the wwwroot directory.
C:\inetpub\wwwroot\mytestsite.com
This allows us to keep all our hosted sites in one folder and all organized by the domain name of the site.
4. Lastly, we will need to assign a Host Name.
Host Names are the names that IIS uses to bind the incoming request to the actual physical files of the site. >>> For example, if you make a request for mytestsite.com as soon as the site gets to the server it passes the server the Host Name, which IIS uses to lookup the appropriate files on the server.
We must have a host name configured for mytestsite.com and www.mytestsite.com. (This is a common mistake and people wonder why the www version of their site is not working. You must also keep in mind that Host Names are unique; you cannot have two sites with the same host names on the server).
5. Once you have these settings configured you are ready to Start the Site and Choose OK. I have included a screenshot below with the proper settings.

Pointing Your Domain Name
The next step is to point your domain name and test your setup. I recommend you point the A Record of both yourdomain.com and www.yourdomain.com. This will allow you to see that both will work. Remember you will need to add the www host name or that version of the domain name will not resolve. In order to add an additional host name, you need to Right Click the site in IIS and choose Edit Binding, then you can Add a new host name binding.
Once your domain name A records are pointed to the IP address of your server, your domain names should then resolve to that server and any files you add to the folder you created in WWWRoot will then be available to you over the web.
Ref:- http://www.interviewwiz.com/iis-interview-questions-answers/
http://www.dotnetfunda.com/interviews/cat/122/iis
Post A Comment:
0 comments: