Opened 7 years ago

Closed 7 years ago

#1374 closed defect (wontfix)

Nginx error_page 499 Error report

Reported by: RYAN4237@… Owned by:
Priority: major Milestone:
Component: other Version: 1.13.x
Keywords: error_page Cc:
uname -a: Linux Tencent-SNG 3.10.94-1-tlinux2_kvm_guest-0019.tl1 #1 SMP Thu Jan 21 17:00:04 CST 2016 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: configure arguments: --prefix=/usr/local/services/tnginx_1_0_0-1.0 --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.60 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.7 --add-module=../ngx_lua_upstream-0.06 --add-module=../headers-more-nginx-module-0.32 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.17 --add-module=../redis2-nginx-module-0.13 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt='-Wl,-rpath,/usr/local/services/tnginx_1_0_0-1.0/luajit/lib -Wl,-rpath,/usr/local/services/tnginx_1_0_0-1.0/lib/luajit/lib' --with-http_stub_status_module --sbin-path=/usr/local/services/tnginx_1_0_0-1.0/bin/nginx --error-log-path=/usr/local/services/tnginx_1_0_0-1.0/log/error.log --http-log-path=/usr/local/services/tnginx_1_0_0-1.0/log/access.log --pid-path=/usr/local/services/tnginx_1_0_0-1.0/log/nginx.pid --lock-path=/usr/local/services/tnginx_1_0_0-1.0/log/nginx.lock --conf-path=/usr/local/services/tnginx_1_0_0-1.0/conf/nginx.conf --http-client-body-temp-path=/usr/local/services/tnginx_1_0_0-1.0/client_body_temp --http-proxy-temp-path=/usr/local/services/tnginx_1_0_0-1.0/proxy_temp --http-fastcgi-temp-path=/usr/local/services/tnginx_1_0_0-1.0/fastcgi_temp --http-uwsgi-temp-path=/usr/local/services/tnginx_1_0_0-1.0/uwsgi_temp --http-scgi-temp-path=/usr/local/services/tnginx_1_0_0-1.0/scgi_temp --with-pcre=/data/release/ranrong/Tnginx/addon/pcre-8.40 --with-zlib=/data/release/ranrong/Tnginx/addon/zlib-1.2.11 --with-openssl=/data/release/ranrong/Tnginx/addon/openssl-1.0.2k --add-module=/data/release/ranrong/Tnginx/addon/nginx-let-module-0.0.4 --add-module=/data/release/ranrong/Tnginx/addon/nginx_tcp_proxy_module-master --add-module=/data/release/ranrong/Tnginx/addon/nginx_menshen_module_64 --add-module=/data/release/ranrong/Tnginx/addon/nginx-http-concat --add-module=/data/release/ranrong/Tnginx/addon/nginx_upstream_check_module-master --add-module=/data/release/ranrong/Tnginx/addon/qos_client --add-module=/data/release/ranrong/Tnginx/addon/ngx_l5_module --add-module=/data/release/ranrong/Tnginx/addon/ngx_mmreport --add-module=/data/release/ranrong/Tnginx/addon/nginx_http_monitor_module --add-module=/data/release/ranrong/Tnginx/addon/ngx_http_dyups_module --add-module=/data/release/ranrong/Tnginx/addon/nginx-add-qvia --with-http_stub_status_module --with-http_ssl_module --without-mail_pop3_module --with-stream --without-mail_imap_module --without-mail_smtp_module --with-http_realip_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_addition_module --with-http_v2_module

Description

Dear Sir,

I got 499 error in my nginx log, and i want to do the fallback action by using "error_page" configuration. But i got below information when i start nginx.

nginx: [emerg] invalid value "499" in /usr/local/services/tnginx_1_0_0-1.0/conf/nginx.conf:61
nginx: configuration file /usr/local/services/tnginx_1_0_0-1.0/conf/nginx.conf test failed

so i just wondering how to do the fallback action if i got 499 return code.

Change History (1)

comment:1 by Maxim Dounin, 7 years ago

Resolution: wontfix
Status: newclosed

You can't. The special code 499 is used in nginx to indicate that client closed the connection, and it is not allowed to configure error_page for this code. Quoting CHANGES:

Changes with nginx 0.4.3                                         26 Sep 2006

    *) Change: now the 499 error could not be redirected using an
       "error_page" directive.

There are no plans to change this behaviour.

Note: See TracTickets for help on using tickets.