# Hide port 16080 after redirect

**URL:** <https://www.ruby-forum.com/t/hide-port-16080-after-redirect/49199>\
**Category:** Rails\
**Created:** [December 1, 2005, 8:45am UTC](https://www.ruby-forum.com/t/hide-port-16080-after-redirect/49199 "2005-12-01T08:45:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cynthia.kiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c77e96/32.png) [@cynthia.kiser](https://www.ruby-forum.com/u/cynthia.kiser)\
**Post date:** [December 1, 2005, 8:45am UTC](https://www.ruby-forum.com/t/hide-port-16080-after-redirect/49199/1 "2005-12-01T08:45:54Z")

</div>

I have a couple of sites running on a Mac OsX server using fcgi  
(Apache 1.3 on Panther). Works fine until my app creates a redirect  
(for example: after create, redirect to list). Then the url of my name  
based virtual host shows :16080. I found a good explanation of port  
16080, virtual hosting, and web performance caching on  
[http://docs.info.apple.com/article.html?artnum=106407](http://docs.info.apple.com/article.html?artnum=106407) They even  
mention potential oddness after redirects - but don’t say how to fix  
it. Is there something I can do in my apache or (more likely) in my  
rails configuration that will hide the pesky port number from end  
users? Perhaps something that sets a canonical url for the app?

–  
Cynthia K.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![cynthia.kiser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c77e96/32.png) [@cynthia.kiser](https://www.ruby-forum.com/u/cynthia.kiser)\
**Post date:** [December 1, 2005, 5:34pm UTC](https://www.ruby-forum.com/t/hide-port-16080-after-redirect/49199/2 "2005-12-01T17:34:34Z")

</div>

On Nov 30, 2005, at 11:42 PM, Cynthia K. wrote:

> –
> 
> Cynthia K.  
> removed\_email\_address@domain.invalid

Cynthia-

```
Here is an apache vhost that you can use to proxy to webrick or

```

lighttpd on a higher port that will keep the port number hidden. I am  
assuming you are running webrick(script/server) for your actual rails  
app and just using apache in front to be on port 80?

\<VirtualHost \*:80\>  
ServerName [example.com](http://example.com)  
ServerAlias [www.example.com](http://www.example.com)  
ProxyPass / [http://example.com:8000/](http://example.com:8000/)  
ProxyPassReverse / [http://example.com:8000/](http://example.com:8000/)

Change [example.com](http://example.com) to your site’s name and change 8000 to the port  
you are running your rails app on and you should be good to go!

Cheers-

-Ezra Z.  
Yakima Herald-Republic  
WebMaster  
[http://yakimaherald.com](http://yakimaherald.com)  
509-577-7732  
removed\_email\_address@domain.invalid
