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 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 Kiser cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
On Nov 30, 2005, at 11:42 PM, Cynthia Kiser wrote:> 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 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 Kiser > cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >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 ServerAlias www.example.com ProxyPass / http://example.com:8000/ ProxyPassReverse / http://example.com:8000/ </VirtualHost> Change 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 Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
The only way I found to prevent port 16080 from showing up after redirect it to turn off Apple''s Performance Caching on every site on the server. If any site is using the performance cache feature, Apache can not listen on port 80. The performance cache is listening there instead and Apache is set to port 16080. When you turn off the performance cache on every site using Apple''s Server Admin tools, it will automatically update the conf files to listen on port 80, and your the redirect issue should be gone. -- Lon Baker Speedymac LLC http://www.speedymac.com AIM: spdemac
I don''t want to proxy to WeBrick, fcgi seems to run faster. And I would just turn off Performance Caching except that solution is fragile. The minute you add a new virtual host, it defaults to having Performance Caching on, and all the virtual hosting gets moved to 16080 again. I was hoping for a configuration option for Rails. Wonder if I can find the code where "where am I" happens and slide this in? Seems a little challenging for a Ruby newbie. -- Cynthia Kiser cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org