Nginx 내 장 된 변수
core module var:
$arg_PARAMETER
$args
$content_length
$content_type
$document_root
$document_uri
$host
$http_user_agent
$http_cookie
$is_args
$limit_rate
$query_string
$request_body_file
$request_method
$remote_addr
$remote_port
$remote_user
$request_filename
$request_uri
$scheme
$server_protocol
$server_addr
$server_name
$server_port
$uri
log module var:
$body_bytes_sent, the number of bytes, transmitted to client minus the response headers. This variable is compatible with the %B parameter of Apache's mod_log_config (this was called $apache_bytes_sent, before version 0.3.10)
$bytes_sent, the number of bytes transmitted to client
$connection, the number of connections
$msec, the current time at the moment of writing the log entry (microsecond accuracy)
$pipe, "p" if request was pipelined
$request_length, the length of the body of the request
$request_time, the time it took nginx to work on the request, in milliseconds, (in seconds for versions older than 0.5.19)
$status, status of answer
$time_local, local time into common log format.
$http_x_forwarded_for, X-Forward information
# apache
------------------------------------------------- APACHE2.2 ------------------------------------------------
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %D %{TETX_USER_KEY}C" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
================================================== Nginx 0.7.35 ============================================
log_format tetx '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" 0 $request_time $TETX_USER_KEY "$http_x_forwarded_for" $host';
:
, 。
,
- mkfifo /path/to/nginx/logs/access_log_pipe
。
cronolog :
- /path/to/cronolog /path/to/log/access_%Y%m%.log < /path/to/nginx/logs/access_log_pipe &
nginx 。 nginx cronolog nginx
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
간단! Certbot을 사용하여 웹 사이트를 SSL(HTTPS)화하는 방법초보자가 인프라 주위를 정돈하는 것은 매우 어렵습니다. 이번은 사이트를 간단하게 SSL화(HTTP에서 HTTPS통신)로 변경하는 방법을 소개합니다! 이번에는 소프트웨어 시스템 Nginx CentOS7 의 환경에서 S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.