Skip to main content
November 25, 2013
Answered

New CF10, Server 2012, Default Document 404

  • November 25, 2013
  • 1 reply
  • 2972 views

On a new WIndows 2012 server (64bit), IIS 8.x installed, CF10 installed (to latest patches), CF10 hardening done. Ran WS-Config on individual IIS sites (not the "All" site). Jakarta virtual directory in place in the IIS site, and pointing to the correct wsconfig file for the IIS site :  {CF-Home}\config\wsconfig\{iis-site-number}

Default document setting in IIS set to defaults; have also tried setting index.htm as first default document.  Browsing to http://mydomain.com/ returns a 404. Browsing to http://mydomain.com/index.htm returns correct content. Problem happens with any subfolder on the site. Have verified that index.htm exists in all tested folders. (Browsing done on the local server console.)

Have deleted site web.config, then re-enabled index.htm as default document in IIS manager. Have checked permissions to the file; they are proper (and beside, going to http://mydomain.com/index.htm works fine, so don't think it is a permissions problem). No URL rewriting at server or site level. Authentication at site and server level set to 'anonymous' enabled, all others disabled.

IIS log files show a port 80 request: GET /  returns the 404. Failed request tracings are  no help.

This happens with any IIS site created. Also happens by IP address.

Have verified all needed IIS components (role features) are installed.

Am now officially stuck at figuring out this problem.

...Rick...

    This topic has been closed for replies.
    Correct answer

    My advice would be to delete your web.config altogether for this test site, and focus on the global IIS settings.  For example, check the Default Document settings for the entire Web farm (highest level) and make sure they are in the correct order.  Work your way from the top down.  Again, since you say you've already hardened CF (which is a massive subject by itself) it's too hard to say what's causing, so I would isolate IIS from CF as much as possible at this point.  Perhaps uninstall and reinstall CF.  Or just Google the issue for IIS8.  I have never used 2012 with IIS8 so I'm probably not the right person to go on much longer about it.  I will drop out at this point, but best of luck, and reply back when solved.


    After checking everything (several times), I decided to start over. So

    - uninstalled ColdFusion, manually removed leftover CF installation folders

    - still get a 404 on http://mydomain.com

    - removed IIS Role and associated features

    - restarted

    - installed IIS Role and associated features

    - set up bindings on all web sites (the web sites were still there, which indicates to me that removing the web server role didn't remove everything)

    - made sure I could get to http://mydomain.com (no slashes), that worked

    - installed features needed for CF installation

    - installed CF again, using my standard settings

    - started the ColdFusion administrator, and updates

    - still can see http://mydomain.com properly

    So, the result, for any interested parties, appears to be something in the IIS configuration or setup or install. Have no idea what, since everything looked OK. (I didn't do a line-by-line check of applicationhost.config).

    But with the above, the http://mydomain.com no longer shows a 404.

    Thanks for the response, though.

    ...Rick...

    1 reply

    Anit_Kumar
    Community Manager
    Community Manager
    November 25, 2013

    Hi Rick,

    Please try adding the following information in web.config:-

    <configuration>

       <system.webServer>

        <defaultDocument>

            <files>

                <add value="index.htm" />

            </files>

        </defaultDocument>

       </system.webServer>

    </configuration>

    Alternatively, enter the following at the command prompt:

    appcmd set config /section:defaultDocument /+files.[value='index.htm']

    where index.htm is the default document to be added. You may try restarting IIS after the above steps.

    Regards,

    Anit Kumar

    November 25, 2013

    This was already done. The file index.htm exists, and it is first in the list at the IIS site level Default Document. It is also correctly configured in the web.config file for the IIS site. IIS and the server have been restarted (several times) since those changes.

            <defaultDocument>

                <files>

                    <clear />

                    <add value="index.htm" />

                    <add value="index.cfm" />

                    <add value="Default.htm" />

                    <add value="Default.asp" />

                    <add value="index.html" />

                    <add value="iisstart.htm" />

                    <add value="default.aspx" />

                </files>

            </defaultDocument>

    Anit_Kumar
    Community Manager
    Community Manager
    November 25, 2013

    Can you try removing all other default documents and only keep <add value="index.htm" /> and restart IIS.

    Regards,

    Anit Kumar