Configuring IIS - Step-by-Step Guide for Localhost Setup

In summary, you can configure IIS as your localhost by following these steps: - installing IIS - setting the directory security to allow the account IUSR_MACH to read/execute on that file/folder.
  • #1
NafiBear
10
0
I would like to understand how I can configure IIS as my localhost, ISS doesn't have config file as does Apache ?
After installing IIS, I tried accessing localhost but I was asked for username/password which I had never set up any,

Thanks for any instructions you offer.
 
Computer science news on Phys.org
  • #2
yeh you will be unless you disable authentication from the mmc snap in for iis. The username and password will be your windows authentication, as far as I remember, not touched iis for a while..
 
  • #3
Sorry, I am completely new to iis, could you be more specific ?
 
  • #4
With IIS you have to be careful about one thing, "permissions".
Your website's root by default is in:
C:/inetpub/wwwroot
You have the option of making files/folders in your web root either available to anyone on the internet (anonymous), or you can restrict them to local users.
The account used by IIS for anonymous access is IUSR_<machinename>, where <machinename> is your machine's name. If your machine's name is MACH, then the account used is:
IUSR_MACH.
In the IIS snap-in (which should be under Start Menu - Control panel - Administrative Tools - Internet information Services (IIS) Manager), on the left side, there is a tree which should look something like:
Code:
Internet Information Services
  - MACH (Local Computer)
     + FTP Sites
     - Websites
        - Default Web Site
           default.html
           someimage.gif
           ...
For any file/folder displayed in this tree you can right-click on it, select properties, then in the directory security tab click "edit". Make sure to check the option "Enable anonymous access" if you don't want the log-in window to come up when you visit your site.
Notice that when you do this IIS sets the folder/file security settings to allow the account IUSR_MACH to read/execute on that file/folder.
What this means is that alternatively you can just right-click on the file/folder in the regular file browser, select properties, then in the security tab click "add", click "advanced", click "find now" (this shows all the user accounts in your computer), select the IUSR_MACH account, press OK. Now your file/folder can accessed anonymously.
Keep in mind that it may not be enough to allow your default.html file to be accessible by anonymous access. What i mean is that if you have any images or files used inside default.html then those files will need to have the security settings set such that they can be accessed anonymously (again you can do this either through IIS or file browser), if not you'll still get the Log In Prompt.
 
Last edited:
  • #5
Thanks for your reply, I do as what you told:
rightclick website->properties->DirectorySecurity->Edit->Check Anonymous Access -> Choose Browse Advance Find to bring up default account -> Check Allow IIS To Control Password.

But when I call localhost at the browser, it says my default account is forbidden, the page called is like an normal error page.


Second, if I tried not to choose default account but take one account appeared from Advance Find, and enter a password for this account, then Uncheck Allow IIS To Control Password, localhost when called would again ask for password but the password I entered isn't recognized, the prompt dialog therefore shows up, I really don't know what to do now.
 
  • #6
What do you mean "default account"? The account that should be used for anonymous access is IUSR_<machinename>. IIS should control the password.
 
  • #7
Are you just playing with IIS?
 
  • #8
NafiBear: I would suggest you go to http://technet.microsoft.com/default.aspx [Broken] and read up, because you need to know some basics on how this technology works, we arent going to spoon feed you here.
 
Last edited by a moderator:
  • #9
Pick up anyone found after the machine scans for accounts, let IIS control your password, open localhost again, it'll work, I am pretty sure.
You seem to have gone so far in the way you tried to configure the server, although I believe it is one of many possible ways problem gets itself resolved. Other options have been clearly explained and apparent enough, nothing about them is to be changed.
For you, I can just say something like that, :wink:
 

What is IIS and why is it important for localhost setup?

IIS (Internet Information Services) is a web server created by Microsoft for hosting websites and web applications. It is important for localhost setup because it allows you to test and develop your websites and applications locally before publishing them online.

How do I install IIS on my local machine?

To install IIS on your local machine, follow these steps:

  1. Open the Control Panel and click on "Programs and Features".
  2. Click on "Turn Windows features on or off".
  3. In the Windows Features window, scroll down and check the box next to "Internet Information Services".
  4. Click "OK" and wait for the installation to complete.

What are the default settings for IIS and how can I customize them?

The default settings for IIS include the default website, default application pool, and default root directory. To customize these settings, you can use the IIS Manager tool. From here, you can create new websites, change the default application pool, and modify the root directory for your websites.

How do I configure IIS to serve multiple websites on my local machine?

To configure IIS to serve multiple websites, follow these steps:

  1. Create a new website in the IIS Manager.
  2. Assign a unique IP address, port, or host header to the new website.
  3. Point the DNS records for the domain to your local machine.
  4. Configure the bindings for the new website in IIS.

What are some common issues when configuring IIS for localhost setup?

Some common issues when configuring IIS for localhost setup include incorrect port or host header settings, incorrect file permissions, and conflicting software or services. It is important to carefully follow the step-by-step guide and troubleshoot any issues that may arise during the configuration process. Additionally, regularly checking and updating your IIS settings can help prevent any potential issues.

Similar threads

Replies
6
Views
6K
  • Programming and Computer Science
Replies
6
Views
1K
  • Computing and Technology
Replies
2
Views
2K
  • Computing and Technology
Replies
24
Views
7K
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
3
Views
13K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
Replies
2
Views
1K
  • Computing and Technology
Replies
4
Views
4K
  • Computing and Technology
Replies
4
Views
3K
Back
Top