Hi, I am using latest nginx (1.4.3) on centos with next location configuration: location ~^/3g { auth_basic "Restricted"; auth_basic_user_file htpasswd; rewrite ^/3g/(.*)$ /$1 break; proxy_pass http://127.0.0.1:18001; # proxy_redirect off; proxy_redirect 127.0.0.1:18001/ /3g/; proxy_set_header SCRIPT_NAME /3g; proxy_set_header X-Script-Name /3g;by yevhen - Nginx Mailing List - Russian