问题
I’m having trouble trying to view my default page or other web application on a newly created site (New Test Site) on IIS 8.5 for Windows 8.1. I included a directory that contains an html page (test.html) outside of the ‘inetpub’ folder.
Add website window
Physical Path: C:\royalcenters Type: http IP Address: All Unassigned Port: 80
I already arranged the ‘test.html’ page to the top of the list of ‘Default Document’ tab.
List of default pages
However, when I ran the new website on a web browser, the page doesn’t appear. It only shows an error page.
I’m trying to run the website with my computer as the server, so does anybody have any ideas on how to on how I can run the new website on my machine? Thank you.
回答1:
first things first goto http://localhost/ and see if it works. It should show the IIS Welcome page with version number. If you get a 503 error check if the default app pool is stopped for some reason. If other errors then need to fix those before proceeding to test your html page.
Try hosting that page under the site "Default Web Sites" that comes pre-built with IIS . It uses the default port 80. So if you want to create your own site you need to use a different port number when you create that new site from IIS manager gui.
The default website typically points to a physical folder : c:\inetpub\wwwroot\
so copy your test.html page to the above folder and test by going to the URL : http://localhost/test.html
if it works then Try to create a new Web Site using directions from here (Step 2) below. You can leave the hostname blank if you only intend to use the URL from your local PC. the url will be http://localhost:port/
http://www.iis.net/learn/manage/creating-websites/scenario-build-a-static-website-on-iis#02
EDIT:
so when you are at this screen when creating a new wesite :http://i.stack.imgur.com/1YwVG.jpg
do this :
- Sitename = Site01
- Apppool = DefaultAppPool (Make sure its started)
- Physical path = C:\inetpub\Site01 -- Need to create and grant full rights to Everyone (for now but need to change later to a specific windows account )
- Port : 8090
- Hostname = Blank
- Click Ok
- Copy test.html to C:\inetpub\Site01
- Browse to http://localhost:8090/test.html
来源:https://stackoverflow.com/questions/38208465/new-website-not-showing-default-page-in-iis-8-5