nginx開啓日誌

vim /usr/local/nginx/conf/nginx.conf
user nginx;
worker_processes 2;nginx

error_log logs/error.log; (開啓錯誤日誌)
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;vim

events {
worker_connections 10240;
}app

http {
include mime.types;
default_type application/octet-stream;ide

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ' (日誌格式)
                 '$status $body_bytes_sent "$http_referer" '
                 '"$http_user_agent" "$http_x_forwarded_for"';

access_log  logs/access.log  main;(開啓訪問日誌)

sendfile        on;
keepalive_timeout  65;

}日誌

相關文章
相關標籤/搜索