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:
- Open PHP and IIS error logs;
- 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
- The main thing is that the field helps
500 19
to represent the 500.19 error, which is checked byweb服务器内部运行错误
- 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.
- 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