ansible_playbooks/roles/different_need_soft_install/files/angie.conf
2026-02-24 11:30:35 +03:00

73 lines
No EOL
2.3 KiB
Text
Executable file

user angie;
worker_processes auto;
worker_rlimit_nofile 65536;
error_log /var/log/angie/error.log notice;
pid /run/angie.pid;
load_module modules/ngx_http_js_module.so;
events {
worker_connections 65536;
}
http {
server_names_hash_bucket_size 128;
include /etc/angie/mime.types;
default_type application/octet-stream;
js_path /etc/angie/njs/;
js_import main from host_transform.js;
log_format waf escape=json
'{'
'"SID":$http_x_sid,'
'"server_name":"$server_name",'
'"app_name":"$host",'
'"proxyed_to":"$upstream_addr",'
'"upstream_status":"$upstream_status",'
'"upstream_response_length":"$upstream_response_length",'
'"upstream_response_time":"$upstream_response_time",'
'"upstream_bytes_sent":"$upstream_bytes_sent",'
'"server_port":$server_port,'
'"server_addr":"$server_addr",'
'"server_protocol":"$server_protocol",'
'"remote_addr":"$remote_addr",'
'"response_status_code":$status,'
'"response_body_bytes_sent":$body_bytes_sent,'
'"http_x_forwarded_for":"$http_x_forwarded_for",'
'"uri":"$uri",'
'"http_user_agent":"$http_user_agent",'
'"query_string":"$query_string",'
'"request_method":"$request_method",'
'"request_time":$request_time,'
'"@timestamp":"$time_iso8601"'
'}';
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format extended '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" rt="$request_time" '
'"$http_user_agent" "$http_x_forwarded_for" '
'h="$host" sn="$server_name" ru="$request_uri" u="$uri" '
'ucs="$upstream_cache_status" ua="$upstream_addr" us="$upstream_status" '
'uct="$upstream_connect_time" urt="$upstream_response_time"';
access_log /var/log/angie/access.log waf;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/angie/http.d/*.conf;
}
#stream {
# include /etc/angie/stream.d/*.conf;
#}