proxy_pass for subfolders

basti black.fledermaus at
Fri Oct 14 11:51:09 UTC 2016

try somethink like

  location /folder1/ {
      rewrite /folder1/(.*)$ /app/$1 break;
      proxy_redirect off;
   // this is only for loging on site2 to see the ip of the user and not
the ip of proxy server
      proxy_set_header Host $host;
      proxy_set_header   X-Real-IP        $remote_addr;
      proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_max_temp_file_size 0;

Best Regards,

p.s i use this to proxy an wordpress site

On 14.10.2016 12:53, avk wrote:
> Hi! Can you help? How use proxy_pass (or other methods) for proxy
> subfolder-requests?  Example: -> proxy to
> Thx!
> Posted at Nginx Forum:,270269,270269#msg-270269
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list