• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

New CF10, Server 2012, Default Document 404

Guest
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

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...

Views

2.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 26, 2013 Nov 26, 2013

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 wo

...

Votes

Translate

Translate
Adobe Employee ,
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

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

Regards,

Anit Kumar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

That did not work either (only index.html in the web.config, restart IIS at server level).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

Can you enable failed request tracing. You may refer to http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/... or http://blogs.msdn.com/b/benjaminperkins/archive/2012/01/02/enable-and-activate-failed-request-tracin...

To narrow down the issue further, can you remove the CF connector and then try to access  http://mydomain.com/ and check if it still returns a 404.

Regards,

Anit Kumar


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 25, 2013 Nov 25, 2013

Copy link to clipboard

Copied

Maybe try running Firebug for Firefox (then go to the "Net" tab) or hit F12 in IE and look at the HTTP calls behind the scenes.  Sometimes there is valuable info there showing the exact headers being sent and received.  Invaluable debugger tool if you ask me.

Otherwise, the fact that you say you "hardened" CF already could mean a lot of things are on lockdown with permissions, etc.  You may want to undo a few of the variables you already hardened until you achieve success, then ramp back up (for example, turn Directory Browsing back on and see if you can "see" the docs on the root).  It's all about eliminating variables.  Perhaps post a screen shot of your CF settings summary?  Are you running any URL Rewrite mods, or a separate URLScan utility?

It's also beneficial to run Failed Request Tracing as Anit pointed out, and enable it for 404 error.  This is an option under your site in IIS.  Anyway, it really does sound more like an IIS issue than a CF issue based on my experience.  But I would also try Anit's other suggestions if you are still at a loss.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

1) Not running any URL rewrites.

2) using the server's IE to browse, with the local hosts file set to resolve the domain to the IP address of the IIS site. So all access is local.

3) The site's application pool is running under the identity of a created user 'iisservice'. That user has these effective rights to the folder with the index.htm

- traverse/execute

- list folder/read data

- read attributes

- read extended attributes

- create files/write data

- create folders/append data

- read permissions

4) If I change that iisservice user to have full rights to the content folder, the http://mydomain.com or http://mydomain.com/folder still fails with a 404, but http://mydomain.com/index.htm or http://mydomain.com/folder/index.htm works.

5) FRT for http://mydomain.com/folder shows a Request URL of "/folder" (without trailing slash); shows the FIle_cache_access_start of "F:\web\site\folder" (that is the physical location of the index.htm file).

6) URLScan is not installed

7) with directory browsing enabled, a request for http://mydomain.com/folder still shows a 404, does not show a directory listing

8) The 404 page does have the proper physical path, and the requested URL hows http://mydomain.com:80/folder (without trailing slash), although if I http://mydomain.com/folder/ (with a trailing slash), still get a 404.

9) File explorer is set to show extensions, so I know the actual file name is index.htm, not index.htm.txt or something else.

10) the 404 says to look at the FRT and 'see which module is calling SetStatus', but I don't see that module name in the FRT detailed view

Still puzzled....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

All these issues, especially #7, seem like an IIS config issue.

7) with directory browsing enabled, a request for http://mydomain.com/folder still shows a 404, does not show a directory listing

I would focus on this particular issue.  If you can eventually get the directory to display the files underneath it then I think you will solve the problem. 

Can you please show us what's inside your entire web.config file?  Also, under IIS "Edit Error Page Settings" please set to "Detailed errors" if not already.  We need more data here (logs, configs, screen shots, etc.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

web.config of test site (index.htm in root of site) (with only index.htm in the default document list, and directory browsing enabled)

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <defaultDocument>

            <files>

                <clear />

                <add value="index.htm" />

            </files>

        </defaultDocument>

        <directoryBrowse enabled="true" />

    </system.webServer>

</configuration>

Detailed errors information on the 404 page (domain name and physical folder sanitized)

Detailed Error Information:

Module   IIS Web Core
Notification   MapRequestHandler
Handler   StaticFile
Error Code   0x80070002
Requested URL   http://mydomain.com:80/
Physical Path   F:\web\testsite
Logon Method   Anonymous
Logon User   Anonymous

The index.htm is in the actual folder (shown above sanitized as F:\web\testsite)

IIS log file for the request  (three shown) (IP address sanitized)

2013-11-26 17:10:02 10.9.161.121 GET / - 80 - xx.xx.xx.xx Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 0 2 250

2013-11-26 17:10:29 10.9.161.121 GET / - 80 - xx.xx.xx.xx Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 0 2 62

2013-11-26 17:13:48 10.9.161.121 GET / - 80 - xx.xx.xx.xx Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 0 2 46

a request to the http://mydomain.com/index.html : IIS log file shows (IP address santized)

2013-11-26 17:19:11 10.9.161.121 GET /index.htm - 80 - xx.xx.xx.xx Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 0 2 0

All looks OK to me....

...Rick..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

I don't think you really need to uninstall and reinstall CF. Once you remove the connector and handler mappings(if not removed automatically), CF is not communicating with IIS anymore.

As it seems to be an IIS related issue (suggested by DCwebGuy as well), Can you then try and see, if the default document is working properly or not

Regards,

Anit Kumar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 26, 2013 Nov 26, 2013

Copy link to clipboard

Copied

LATEST

I tried uninstalling and reinstalling ColdFusion before the 'big starting over' detailed above, and still got a 404. Then I tried uninstalling CF, and still got a 404.

So the ultimate fix was uninstalling CF, then remove the web server role, then starting over with the install process (web server role, then CF).

The page worked after web server role add, and also after CF install. So all is well now.

Not sure what was different.  I did copy some web content from the current live site, and that included the asp_net folder in the site root, so maybe that is the culprit.  I am currently copying over the web content from the current live site,excluding the asp_net folder, then will test everything again. But that will take several hours.

..Rick...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation