I think I fixed it. If someone needs it: --- location ~ /shop(/.*) { proxy_pass http://www.example.ro; include conf/proxy_general.conf; } --- If there is a more elegant way, please reply. Thanks. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,83458,83486#msg-83486