title: When to use route_url or route_path in Pyramid?
body: <p>I have an issue with route_url and my setup. On the server I have a paster server which listen on 127.0.0.1 on port 6543 and a nginx server which does reverse proxying from port 80 to port 6543.</p>
  
  <p>I'm also using paste prefix to retrieve the real client IP with this setup in my ini file:</p>
  
  <pre><code>[filter:paste_prefix]
  use = egg:PasteDeploy#prefix
  
  [pipeline:main]
  pipeline = 
    paste_prefix
    myapp
  </code></pre>
  
  <p>The server is on a private LAN and I'm trying to connect to the server through a SSH tunnel set up as this: </p>
  
  <pre><code>ssh me@sshgateway -L 8080:nginx_server_ip:80
  </code></pre>
  
  <p>And I connect to the web page on my client at this url: <code>http://localhost:8080</code></p>
  
  <p>The main page is displayed correctly but then all links generated with request.route_url are redirecting to <code>localhost/url</code> (without the :8080). 
  I guess this have something to do either with nginx or paste prefix (or both). </p>
  
  <p>I hope that replacing route_url with route_path will probably solve this problem without fixing the nginx/ini setup issue.</p>
  
  <p>Is there any reason to call route_url instead of route_path, ever ? </p>