I have try : http { perl_set $backend_url 'sub { return "http://www.google.fr"; }'; server { listen 80; location / { proxy_pass $backend_url; } } } But don't work, an idea ? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,12699,12715#msg-12715