All PHP interfaces under a path under the IIS server environment do not run 500.19 error

Source: Internet
Author: User

All PHP interfaces under a path (folder) under an IIS server environment fail to run the 500.19 error

Environment: IIS8.5 + php7.2.1
Error description: A directory (such as D:\web\A) all PHP interface document run error, interface test tool returned empty content, browser prompt 500 error

How to resolve:

    1. Open PHP and IIS error logs;
    2. Viewing the IIS logs, discovering clues
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken2018-07-31 09:33:36 172.0.0.0 GET /xxxx/xxx.php - 443 - 100.0.0.0 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/64.0.3282.140+Safari/537.36+Edge/17.17134 - 500 19 183 15
    1. The main thing is that the field helps 500 19 to represent the 500.19 error, which is checked byweb服务器内部运行错误
    2. Carefully review the IIS settings and recall the possible changes, found that the A directory is a "new" directory, all the files are copied from the previous test server, which originally belonged to the test server on a separate "site" configuration, so the web.config file contains the ". txt" request filtering, That is, access to the file ". txt" is not allowed. When the A directory is copied to the current server as a whole, it is saved to a virtual directory under the default Web site, and the default Web site also sets the same request filter, which causes configuration conflicts and an error in the A overall path when access is made.
    3. Open A The next configuration file, removing all and the "site" conflicting configuration, specifically
<security>            <requestFiltering>                <fileExtensions>                    <add fileExtension=".txt" allowed="false" />                </fileExtensions>            </requestFiltering>        </security>

and apply, restart the site, solve

All PHP interfaces under a path under the IIS server environment do not run 500.19 error

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.