logging and debugging
This commit is contained in:
@@ -12,14 +12,25 @@ http {
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
log_format debug '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'request_body: "$request_body" '
|
||||
'upstream_status: "$upstream_status" '
|
||||
'upstream_response_time: "$upstream_response_time" '
|
||||
'resp_content_type: "$sent_http_content_type" '
|
||||
'resp_content_length: "$sent_http_content_length"';
|
||||
|
||||
access_log logs/access.log debug;
|
||||
error_log logs/error.log debug;
|
||||
|
||||
# Standard Configuration from Wiki
|
||||
upstream seaweedfs {
|
||||
server 127.0.0.1:8334;
|
||||
server 127.0.0.1:8333;
|
||||
keepalive 20;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8333 ssl;
|
||||
listen 443 ssl;
|
||||
server_name localhost;
|
||||
|
||||
ssl_certificate cert.pem;
|
||||
@@ -33,6 +44,7 @@ http {
|
||||
|
||||
ignore_invalid_headers off;
|
||||
client_max_body_size 0;
|
||||
client_body_buffer_size 128k;
|
||||
proxy_buffering off;
|
||||
|
||||
location / {
|
||||
@@ -48,8 +60,12 @@ http {
|
||||
proxy_connect_timeout 300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_request_buffering off;
|
||||
proxy_request_buffering on;
|
||||
chunked_transfer_encoding off;
|
||||
|
||||
# Log response headers
|
||||
add_header X-Debug-Status $upstream_status;
|
||||
add_header X-Debug-Time $upstream_response_time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user