Get the App
SLTechnology News&Howtos  ›  Servers  › 

Nginx opens log file to start error report

Shulou Source: shulou.com Published: 2022-06-03 04:31:21 09月22日 Update

When nginx opens the log file, the following error occurs when starting the web service

[root@localhost ~]# service nginx start nginx: [emerg] unknown log format "main" in /usr/local/nginx/conf/nginx.conf:41

Yes, because the main log of the log file is enabled, you can choose to delete the main log option or enable the log_format main option.

Open nginx configuration file

or

Complete the above configuration to open

Tags: Logs files configuration web pages services selection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MariaDB vpn OPPO Reno Redmi