nginx unknown directive "" error

nginx: [emerg] unknown directive "?#upstream"

This problem occurs because of the modularization of nginx, and some online browsing errors of this problem say that there are missing plug-ins, and some say that the format is incorrect.

The way to troubleshoot this problem is

  1. Check if the configuration format is correct

  2. Check whether the configuration content is correct

  3. Check plugin

  4. If the above troubleshooting is OK, you can try to make a copy of the nginx.conf file, rename and replace the content with your configuration. It might be a file encoding issue. . . .

I solved it by the 4th method

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325464145&siteId=291194637