Tag Archives: 500

Error 500 when opening the site configured by nginx

500 minutes

Say

1. Site directory structure

wwwroot

website

public

application

……

2 nginx

server
{
listen 80;
server name test.aa.com
index index.html index.php default.html default.html default.php;
root/data/wwwroot/website/public;

……

—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–

nginx/conf/fastcgi.conf

fastcgi param php admin value“open basedir=$document root/:/tmp/:/proc/:/data/wwwroot/”;

Note: add red part

JQuery remote calling WebService reported an error, 500 error

In these two days, CRM, one of the key development branches of the Department, went online. JQuery is used to call WebService through Ajax. An inexplicable 404 error was reported during the test. After analysis, 404 it is because the error page error.aspx configured by web.config itself does not exist, so this error makes it confusing to find the real reason. In the final analysis, it is lack of experience.   

after this error is eliminated, the real cause of the error is that 500 errors are reported, which is correct locally; It is also correct to directly enter the server for testing; Open the browser remote call, and an error will be reported. It’s obvious that Google keyword: jQuery reports errors when calling WebService remotely. There are a lot of solutions, which are simple and effective. Here’s a record:

It turns out that the default post setting in web.config does not allow remote calling of WebService. Just change the configuration.    
if you want to call it normally remotely, you need to modify web.config and add the following paragraph under the system.web section

<webServices >
  <protocols >
  <add name="HttpSoap"/>
  <add name="HttpPost"/>
  <add name="HttpGet"/>
  <add name="Documentation"/>
  </protocols>
 </webServices>