title: Apache to NGINX proxy configuration redirect rules
body: <p>I searched some topics regarding Apache to Nginx conversion, but I was unable to find one that relates to Proxy configuration rules. I'm a complete newcomer to server languages, but I'm in desperate need to migrate my website to the new hosting providers (that is running on Nginx).</p>
  
  <p>I need to redirect all traffic from www.impactteachers.com/teach to application.impactteachers/teach.</p>
  
  <p>In Apache:</p>
  
  <pre><code>ProxyRequests Off
  ProxyPreserveHost On
  
  
  
  &lt;Proxy http://application.impactteachers.com:8080/teach/&gt;
     Order allow,deny
     Allow from all
  &lt;/Proxy&gt;
  
  
  
  ProxyPass /teach/ http://application.impactteachers.com:8080/teach/
  ProxyPassReverse /teach/ http://application.impactteachers.com:8080/teach/
  </code></pre>
  
  <p>I have tried @John suggestion (Thank you for leading me in the right direction) but still no luck and I changed t he code to what I found here <a href="http://wiki.nginx.org/LikeApache" rel="nofollow noreferrer">http://wiki.nginx.org/LikeApache</a></p>
  
  <p>So this is where I'm at:</p>
  
  <pre><code>location /teach {
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-Server $host;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  
     proxy_pass              http://application.impactteachers.com:8080;
     proxy_redirect          off;
  }
  </code></pre>
  
  <p>Still nothing, can you guys help me out?</p>