简体   繁体   中英

IIS server on Windows Server 2012 not opening a website

I have Windows Server 2012 and SQL Express 2014 running on it. I set up IIS on it and uploaded my website as well as the database.

My problem is that when I try to navigate to the page it automatically gives me http://192.168.0.72/cms/holding.html (gives me this holding.html) page but the landing page does exist so I am lost as to what can be wrong.

The credentials on the config file of the website has all the correct information. If someone could help that would be much appreciated, or at least point me to the right direction.

It may be that the default document is not configured correctly in you web.config. You could try specifying the default explicitly to see if this is the case.

<configuration>
   <system.webServer>
    <defaultDocument>
        <files>
            <clear/>     
            <add value="defaultPage.html" />
        </files>
    </defaultDocument>
   </system.webServer>
</configuration>
  1. Open Internet Information Services (IIS) Manager:

  2. In the Connections pane, expand the server name, expand Sites, and then navigate to the Web site or application where you want to configure default documents.

  3. In the Home pane, double-click Default Document.

  4. In the Actions pane, click Add...

  5. In the Add Default Document dialog box, type the name of the default document that you want to add in the Name box, and then click OK.

6.If necessary, in the Actions pane, select a default document in the list, and then click Move Up or Move Down to define the order in which IIS should search through the default document list.

  1. In the Default Document alert box, click Yes to decline configuration inheritance from a parent configuration level, or click No or Cancel to cancel the change in default document order.

  2. If necessary, click Remove in the Actions pane to remove any file names that you do not want to use as default documents.

This is what is defined in the config file:

<system.webServer>
        <defaultDocument>
            <files>
                <clear />
                <add value="Default.asp" />
                <add value="default.aspx" />
                <add value="Default.htm" />
                <add value="index.html" />
                <add value="home.asp" />
                <add value="index.htm" />
                <add value="iisstart.htm" />
            </files>
        </defaultDocument>
        <httpErrors errorMode="Detailed" />
        <urlCompression doStaticCompression="true" doDynamicCompression="true" />
        <directoryBrowse enabled="false" />
    </system.webServer>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM