I can get Apache to forward requests on the ip address of my computer
to a rails app on mongrel using:
<VirtualHost *:80>
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000
</VirtualHost>
ie. http://nnn.nnn.nnn.nnn/ fires up my app on mongrel on port 3000
I want to have several different rails apps on different ports and do
something like
http://nnn.nnn.nnn.nnn/app1 goes to app1 mongrel on 3000
http://nnn.nnn.nnn.nnn/app2 goes to app2 mongrel on say 4000
I have played around with server names and server alias but have going
around in circles.
Note that I have no DNS entry I am just going straight to the ip
address at the moment.
Any tips would be appreciated.
Thanks
giorgio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
giorgio wrote:> > > I can get Apache to forward requests on the ip address of my computer > to a rails app on mongrel using: > > <VirtualHost *:80> > > ProxyPass / http://localhost:3000/ > ProxyPassReverse / http://localhost:3000 > </VirtualHost> > > ie. http://nnn.nnn.nnn.nnn/ fires up my app on mongrel on port 3000 > I want to have several different rails apps on different ports and do > something like > http://nnn.nnn.nnn.nnn/app1 goes to app1 mongrel on 3000 > http://nnn.nnn.nnn.nnn/app2 goes to app2 mongrel on say 4000 > > I have played around with server names and server alias but have going > around in circles. > > Note that I have no DNS entry I am just going straight to the ip > address at the moment. > > Any tips would be appreciated. > > Thanks > giorgioScroll to the bottom of this thread: http://www.ruby-forum.com/topic/100239 and read the second to last reply in there. Read up from there if you don''t understand what''s going on. Basically Mongrel has a --prefix switch that allows it to recognize that the Rails app is being called with a path prefix like your above example. Then you just have to fiddle with Apache to make sure the paths match up/pass through properly. -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Remove the port from your virtual host statement. Under debian / ubuntu server edit or create the following file: /etc/apache2/conf.d/virtual.conf Add the following line: NameVirtualHost * Good luck On Sep 4, 3:53 am, giorgio <george.pever...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I can get Apache to forward requests on the ip address of my computer > to a rails app on mongrel using: > > <VirtualHost *:80> > > ProxyPass /http://localhost:3000/ > ProxyPassReverse /http://localhost:3000 > </VirtualHost> > > ie.http://nnn.nnn.nnn.nnn/fires up my app on mongrel on port 3000 > I want to have several different rails apps on different ports and do > something likehttp://nnn.nnn.nnn.nnn/app1goes to app1 mongrel on 3000http://nnn.nnn.nnn.nnn/app2goes to app2 mongrel on say 4000 > > I have played around with server names and server alias but have going > around in circles. > > Note that I have no DNS entry I am just going straight to the ip > address at the moment. > > Any tips would be appreciated. > > Thanks > giorgio--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---