Hi all, I''m not sure if this is the right forum for this question, but here goes: I have a web server at home (Apache2, Ubuntu) that is running two Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses ports 8000 to 8003 and app2 uses ports 9000 to 9003). I have a domain pointing to app1 and a sub-domain pointing to app2 and everything works perfectly from OUTSIDE my local network. My problem is that my router (I''m on AT&T''s U-Verse) will not allow me to make calls to my web server using the public IP address or either one of the domain names (not exactly sure why, but apparently this is a known issue). What I need to be able to do is run either one of these sites from inside my network. If I go to http://192.168.1.69 (the internal IP of my web server) I get the app1 (default) site which is just fine. How do I get to app2 though? I know this is more of an Apache-specific question, but I thought that since I was dealing with a Rails/Mongrel setup, this might be a good place to start. Any ideas? Thanks! -Brian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Sep-15 17:57 UTC
Re: Accessing multiple rails apps from inside network
On 15 Sep 2008, at 17:47, bmcelhany wrote:> > Hi all, > > I''m not sure if this is the right forum for this question, but here > goes: > > I have a web server at home (Apache2, Ubuntu) that is running two > Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses > ports 8000 to 8003 and app2 uses ports 9000 to 9003). I have a domain > pointing to app1 and a sub-domain pointing to app2 and everything > works perfectly from OUTSIDE my local network. > > My problem is that my router (I''m on AT&T''s U-Verse) will not allow me > to make calls to my web server using the public IP address or either > one of the domain names (not exactly sure why, but apparently this is > a known issue).Yeah, some routers don''t do that.> What I need to be able to do is run either one of > these sites from inside my network. If I go to http://192.168.1.69 > (the internal IP of my web server) I get the app1 (default) site which > is just fine. How do I get to app2 though? >you could add entries to your /etc/hosts pointing all of the appropriate subdomains to 192.168.1.69. eg 192.168.1.69 www.example.com 192.168.1.69 other.example.com or you might find it neater to separate this out 192.168.1.69 www.example.local 192.168.1.69 other.example.local and then point your browser at www.example.local (you''d have to add www.example.local , other.example.local as server aliases in the appropriate VirtualHost entries. Fred> I know this is more of an Apache-specific question, but I thought that > since I was dealing with a Rails/Mongrel setup, this might be a good > place to start. Any ideas? > > Thanks! > > -Brian > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Another option would be to run a split-horizon DNS server internally that will hand out internal ips to internal clients and external ips to external clients. Look at tinydns / dnscache for a decent solution. Cheers, Darrik -- Darrik Mazey DMT Programming, LLC. Office: 330.983.9941 Mobile: 330.808.2025 darrik-hYmAEBE3lWIoJ/VrfD3uVNBPR1lH4CV8@public.gmane.org On Sep 15, 2008, at 1:57 PM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote:> > > On 15 Sep 2008, at 17:47, bmcelhany wrote: > >> >> Hi all, >> >> I''m not sure if this is the right forum for this question, but here >> goes: >> >> I have a web server at home (Apache2, Ubuntu) that is running two >> Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses >> ports 8000 to 8003 and app2 uses ports 9000 to 9003). I have a domain >> pointing to app1 and a sub-domain pointing to app2 and everything >> works perfectly from OUTSIDE my local network. >> >> My problem is that my router (I''m on AT&T''s U-Verse) will not allow >> me >> to make calls to my web server using the public IP address or either >> one of the domain names (not exactly sure why, but apparently this is >> a known issue). > > Yeah, some routers don''t do that. > >> What I need to be able to do is run either one of >> these sites from inside my network. If I go to http://192.168.1.69 >> (the internal IP of my web server) I get the app1 (default) site >> which >> is just fine. How do I get to app2 though? >> > you could add entries to your /etc/hosts pointing all of the > appropriate subdomains to 192.168.1.69. eg > > 192.168.1.69 www.example.com > 192.168.1.69 other.example.com > > or you might find it neater to separate this out > > 192.168.1.69 www.example.local > 192.168.1.69 other.example.local > > and then point your browser at www.example.local (you''d have to add www.example.local > , other.example.local as server aliases in the appropriate VirtualHost > entries. > > Fred >> I know this is more of an Apache-specific question, but I thought >> that >> since I was dealing with a Rails/Mongrel setup, this might be a good >> place to start. Any ideas? >> >> Thanks! >> >> -Brian >>> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There''s a better approach here than working with routers and so forth. Have you checked out Phusion Passenger -- it makes stuff like this really easy without having to mess around with DNS settings. Railscasts did a screencast on it at: http://railscasts.com/episodes/122-passenger-in-development Check it out. Hope this helps, Neal On Sep 15, 11:47 am, bmcelhany <bmcelh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I''m not sure if this is the right forum for this question, but here > goes: > > I have a web server at home (Apache2, Ubuntu) that is running two > Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses > ports 8000 to 8003 and app2 uses ports 9000 to 9003). I have a domain > pointing to app1 and a sub-domain pointing to app2 and everything > works perfectly from OUTSIDE my local network. > > My problem is that my router (I''m on AT&T''s U-Verse) will not allow me > to make calls to my web server using the public IP address or either > one of the domain names (not exactly sure why, but apparently this is > a known issue). What I need to be able to do is run either one of > these sites from inside my network. If I go tohttp://192.168.1.69 > (the internal IP of my web server) I get the app1 (default) site which > is just fine. How do I get to app2 though? > > I know this is more of an Apache-specific question, but I thought that > since I was dealing with a Rails/Mongrel setup, this might be a good > place to start. Any ideas? > > Thanks! > > -Brian--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for everyone''s response! This is exactly what I was looking for...I''ll look into the various solutions and see what makes the most sense to my situation. On Sep 15, 12:18 pm, Neal L <neal.lo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> There''s a better approach here than working with routers and so > forth. Have you checked out Phusion Passenger -- it makes stuff like > this really easy without having to mess around with DNS settings. > Railscasts did a screencast on it at: > > http://railscasts.com/episodes/122-passenger-in-development > > Check it out. > > Hope this helps, > Neal > > On Sep 15, 11:47 am, bmcelhany <bmcelh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi all, > > > I''m not sure if this is the right forum for this question, but here > > goes: > > > I have a web server at home (Apache2, Ubuntu) that is running two > > Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses > > ports 8000 to 8003 and app2 uses ports 9000 to 9003). I have a domain > > pointing to app1 and a sub-domain pointing to app2 and everything > > works perfectly from OUTSIDE my local network. > > > My problem is that my router (I''m on AT&T''s U-Verse) will not allow me > > to make calls to my web server using the public IP address or either > > one of the domain names (not exactly sure why, but apparently this is > > a known issue). What I need to be able to do is run either one of > > these sites from inside my network. If I go tohttp://192.168.1.69 > > (the internal IP of my web server) I get the app1 (default) site which > > is just fine. How do I get to app2 though? > > > I know this is more of an Apache-specific question, but I thought that > > since I was dealing with a Rails/Mongrel setup, this might be a good > > place to start. Any ideas? > > > Thanks! > > > -Brian--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---