If you need to debug nginx carefully, you need to see its http://www.aliyun.com/zixun/aggregation/10818.html >debug information. This information is not recorded by default, and the following methods show you how to view the information.
Debug only one connection and modify the Nginx configuration file to:
Error_log/var/log/nginx/errors;
Events {
Debug_connection 192.168.1.1;
}
Set Error_log to output debug information
Syntax:error_log file [Debug | info | notice | warn | error | crit]
Default: ${prefix}/logs/error.log
Compile nginx with this option: –with-debug, you can see the debug information, configure the output format:
Error_log LOGFILE [Debug_core | debug_alloc | debug_mutex | debug_event
| Debug_http | DEBUG_IMAP];
Log_format access ' $remote _addr– $remote _user [$time _local] ' $request '
' $status $body _bytes_sent $http _referer '
' $http _user_agent ' $http _x_forwarded_for ';
Access_log/var/log/nginx/access.log access;
OK, restart Nginx, you can access the page, to debug.
From Nginx Chinese web: http://www.nginx.com.cn/?p=354