nginx rewrites $request_method on error

kay nginx-forum at
Wed May 7 06:30:57 UTC 2014

Sure, you can use nginx.conf from my previous message and this server

server {
    listen       80;

rewrite_by_lua '
local res = ngx.location.capture("/memc?cmd=get&key=test")

    location / {
                root /etc/nginx/www;

location /memc {
    access_log              /var/log/nginx/memc_log main;
    log_subrequest          on;
    set                     $memc_key $arg_key;
    set                     $memc_cmd $arg_cmd;
    memc_cmds_allowed       get;
    memc_pass               vmembase-2:11211;


If you enable "error_page 405 /error.html;" nginx will hang on "curl -X
TRACE localhost"
If you disable "error_page 405 /error.html;" - everything will be fine.

Posted at Nginx Forum:,249754,249881#msg-249881

More information about the nginx mailing list