{"action":"opened","issue":{"url":"https://api.github.com/repos/openresty/ngx_openresty/issues/82","labels_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/82/comments","events_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/82/events","html_url":"https://github.com/openresty/ngx_openresty/issues/82","id":56123566,"number":82,"title":"use regular expression in location doesn't work","user":{"login":"doodle88","id":3278763,"avatar_url":"https://avatars.githubusercontent.com/u/3278763?v=3","gravatar_id":"","url":"https://api.github.com/users/doodle88","html_url":"https://github.com/doodle88","followers_url":"https://api.github.com/users/doodle88/followers","following_url":"https://api.github.com/users/doodle88/following{/other_user}","gists_url":"https://api.github.com/users/doodle88/gists{/gist_id}","starred_url":"https://api.github.com/users/doodle88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doodle88/subscriptions","organizations_url":"https://api.github.com/users/doodle88/orgs","repos_url":"https://api.github.com/users/doodle88/repos","events_url":"https://api.github.com/users/doodle88/events{/privacy}","received_events_url":"https://api.github.com/users/doodle88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-31T12:34:42Z","updated_at":"2015-01-31T12:34:42Z","closed_at":null,"body":"objective: redirect https://hostname/(?<prj>\\w+).googlecode/(?<path>.*) to https://$prj.googlecode.com/$path\r\ntest url: https://hostname/mythbox.googlecode/files/script.mythbox.1.1.0.zip\r\n\r\nfollowing code answers me with \"502 Bad Gateway\" error:\r\n location ~ '^/(\\w+)\\.googlecode/(.*)$' {\r\n        proxy_pass \"https://$1.googlecode.com/$2\";\r\n }\r\nI replaced the proxy_pass with echo, the target url is correct and location without re works properly. Any idea???\r\n"}}