5

trouble with location regex and redirection in nginx

view full story
linux-howto

http://serverfault.com – I want to setup proxy in nginx: location ~ ^/m/([^/]*)/([^/]*)/([^/]*)$ { proxy_pass http://127.0.0.1:8080/redir/m/$1/$2/$3; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } It works but this address http:// myhost/m/test//ss gets translated to http:// 127.0.0.1:8080/redir/m/test/ss; How can I get my second slash?? Thanx. (HowTos)