Nginx url forwarding only?

Basically I have no prior knowledge to its working.
I am building predictionio server and I cannot have couple hundred of ports open for each engine.
[ predictionio has its own built in integrated java based apache which i do not have access. ]

so I would like to know if I can forward/redirect url’s with it only, while still using built-in predictionio engine. If so how would my script for site look like?

[this is what i want as example]
http://example/engines/view (port 80) forwarded to http://example:8000
et cetera.

That’s a great question, something I’ll have to look into, see if it can be done with nginx.

In apache, you can enable the mod_proxy module which obviously enables proxying ports, either local or remote.

A proxypass setup on a VirtualHost in apache would look a little something like this:

<VirtualHost *:80>
ServerName example.local
DocumentRoot /var/www
ProxyPass /engines/view http://localhost:8000/
ProxyPassReverse /engines/view http://localhost:8000/
<Proxy *>
    Order deny,allow
	Allow from all
</Proxy>
</VirtualHost>

In this case, if you were to visit http://example.local/engines/view, you would actually receive whatever is on http://localhost:8000

A simple Google search has turned up this, look like it’s fairly simple. Unfortunately I’m not very proficient with nginx, so hopefully you won’t run into many issues.

i actually found this; i was able to use it as example

Nice! Glad you got it figured out.