# Rack, map (forward) Port to URI

**URL:** <https://www.ruby-forum.com/t/rack-map-forward-port-to-uri/166374>\
**Category:** Ruby\
**Created:** [April 24, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/rack-map-forward-port-to-uri/166374 "2009-04-24T13:39:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 24, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/rack-map-forward-port-to-uri/166374/1 "2009-04-24T13:39:25Z")

</div>

Hello, Is that possible to map Port to URI with Rack?

I want to integrate Site writen in Ruby with Zimbra Mail and some other  
systems:

Site URI: [www.company.com/site](http://www.company.com/site) \<= localhost:80  
Zimbra Mail: [www.company.com/site/mail](http://www.company.com/site/mail) \<= localhost:81  
App XXX: [www.company.com/site/xxx](http://www.company.com/site/xxx) \<= localhost:XX

As i understand it’s possible to do with Unix Port Forwarding and Some  
Apache Machinery, but it would be a lot simpler and better to do it with  
Rack.

Thanks!

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 24, 2009, 9:35pm UTC](https://www.ruby-forum.com/t/rack-map-forward-port-to-uri/166374/2 "2009-04-24T21:35:33Z")

</div>

On Friday 24 April 2009 06:39:31 Alexey P. wrote:

> Hello, Is that possible to map Port to URI with Rack?

Probably…

> I want to integrate Site writen in Ruby with Zimbra Mail and some other  
> systems:
> 
> Site URI: [www.company.com/site](http://www.company.com/site) \<= localhost:80  
> Zimbra Mail: [www.company.com/site/mail](http://www.company.com/site/mail) \<= localhost:81  
> App XXX: [www.company.com/site/xxx](http://www.company.com/site/xxx) \<= localhost:XX

You want a proxy.

> As i understand it’s possible to do with Unix Port Forwarding

Nope.

> and Some  
> Apache Machinery,

Apache, or nginx, or perlbal, or…

You may find a proxy that someone has built on Rack, but you really  
don’t want  
to do this yourself. I’d recommend you just use nginx.
