How to rewrite nginx to proxy?

New to rewrites. Running 2 services on my host:

  location /{
      #this works fine
      proxy_pass http://myMainServiceIp/;    
   }

   location /wordpress{
      #works but redirects to http://example.com/wp-admin/install.php
      #rather than http://example.com/blog/wp-admin/install.php
      proxy_pass http://wordpressServiceIp/;    
   }

How can I forward /blog/*params*/*etc*/*etc* to my wordpress service correctly?

Read more here: How to rewrite nginx to proxy?

Leave a Reply

Your email address will not be published. Required fields are marked *