Under windows, I am able to set up one virtual host that works with mongrel no problem. The issue is when I set up additional ones I cannot get to them. I look in the log file of the first app and it is trying to go there. Does anyone know how to set up multiple virtual hosts with rails? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, This is not a rails problem but an issue for your webserver. I can only speak for unix systems but the path is usually the same: user sends a request to port 80, the webserver (e.g. apache) accepts it and decides wether to deliver a file or proxy the request to the mongrel. Usually there are more than one mongel and they run on port 3000 upwards. Let us know about you system details, what webserver you use. ciao, tom On Jan 31, 4:04 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Under windows, I am able to set up one virtual host that works with > mongrel no problem. The issue is when I set up additional ones I > cannot get to them. I look in the log file of the first app and it is > trying to go there. > Does anyone know how to set up multiple virtual hosts with rails?-- Thomas R. "TomK32" Koll <> http://ananasblau.com just a geek trying to change the world http://github.com/TomK32 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
windows, apache 2.2. I set the virtual hosts like the docs say but I can only get to one of them, the first one in the list of virtual hosts. On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll <tomk32-Mmb7MZpHnFY@public.gmane.org> wrote:> > Hi, > > This is not a rails problem but an issue for your webserver. > I can only speak for unix systems but the path is usually the same: > > user sends a request to port 80, the webserver (e.g. apache) accepts > it and > decides wether to deliver a file or proxy the request to the mongrel. > Usually there are more than one mongel and they run on port 3000 > upwards. > > Let us know about you system details, what webserver you use. > > ciao, tom > > On Jan 31, 4:04 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Under windows, I am able to set up one virtual host that works with > > mongrel no problem. The issue is when I set up additional ones I > > cannot get to them. I look in the log file of the first app and it is > > trying to go there. > > Does anyone know how to set up multiple virtual hosts with rails? > > > -- > Thomas R. "TomK32" Koll <> http://ananasblau.com > just a geek trying to change the world > http://github.com/TomK32 > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> windows, apache 2.2. I set the virtual hosts like the docs say but I can > only get to one of them, the first one in the list of virtual hosts. > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll <tomk32-Mmb7MZpHnFY@public.gmane.org> wrote: > >> >> Hi, >> >> This is not a rails problem but an issue for your webserver. >> I can only speak for unix systems but the path is usually the same: >> >> user sends a request to port 80, the webserver (e.g. apache) accepts >> it and >> decides wether to deliver a file or proxy the request to the mongrel. >> Usually there are more than one mongel and they run on port 3000 >> upwards. >> >> Let us know about you system details, what webserver you use. >> >> ciao, tom >> >> On Jan 31, 4:04 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Under windows, I am able to set up one virtual host that works with >> > mongrel no problem. The issue is when I set up additional ones I >> > cannot get to them. I look in the log file of the first app and it is >> > trying to go there. >> > Does anyone know how to set up multiple virtual hosts with rails? >> >> >> -- >> Thomas R. "TomK32" Koll <> http://ananasblau.com >> just a geek trying to change the world >> http://github.com/TomK32 >> >> >Hi, are you using a different ServerName for each virtual host? Also, did you correctly configure the equivalent of Unix hosts'' file under Windows? -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Do you need to modify the hosts file if I go to my server address? Yes i have a different ServerName for each one. On Jan 31, 9:11 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > windows, apache 2.2. I set the virtual hosts like the docs say but I can > > only get to one of them, the first one in the list of virtual hosts. > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll <tom...-Mmb7MZpHnFY@public.gmane.org> wrote: > > >> Hi, > > >> This is not a rails problem but an issue for your webserver. > >> I can only speak for unix systems but the path is usually the same: > > >> user sends a request to port 80, the webserver (e.g. apache) accepts > >> it and > >> decides wether to deliver a file or proxy the request to the mongrel. > >> Usually there are more than one mongel and they run on port 3000 > >> upwards. > > >> Let us know about you system details, what webserver you use. > > >> ciao, tom > > >> On Jan 31, 4:04 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > Under windows, I am able to set up one virtual host that works with > >> > mongrel no problem. The issue is when I set up additional ones I > >> > cannot get to them. I look in the log file of the first app and it is > >> > trying to go there. > >> > Does anyone know how to set up multiple virtual hosts with rails? > > >> -- > >> Thomas R. "TomK32" Koll <>http://ananasblau.com > >> just a geek trying to change the world > >>http://github.com/TomK32 > > Hi, are you using a different ServerName for each virtual host? Also, did > you > correctly configure the equivalent of Unix hosts'' file under Windows? > > -Conrad--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 7:20 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Do you need to modify the hosts file if I go to my server address? Yes > i have a different ServerName for each one.So are you accessing your server by IP address or host name? If it''s the former you have to use a different IP for each virtual host. Perhaps you should post the relevant parts of your conf files. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 7:20 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Do you need to modify the hosts file if I go to my server address? Yes > i have a different ServerName for each one. > > On Jan 31, 9:11 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Sat, Jan 31, 2009 at 6:58 AM, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > windows, apache 2.2. I set the virtual hosts like the docs say but I > can > > > only get to one of them, the first one in the list of virtual hosts. > > > > > On Sat, Jan 31, 2009 at 2:54 AM, Thomas R. Koll <tom...-Mmb7MZpHnFY@public.gmane.org> wrote: > > > > >> Hi, > > > > >> This is not a rails problem but an issue for your webserver. > > >> I can only speak for unix systems but the path is usually the same: > > > > >> user sends a request to port 80, the webserver (e.g. apache) accepts > > >> it and > > >> decides wether to deliver a file or proxy the request to the mongrel. > > >> Usually there are more than one mongel and they run on port 3000 > > >> upwards. > > > > >> Let us know about you system details, what webserver you use. > > > > >> ciao, tom > > > > >> On Jan 31, 4:04 am, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > Under windows, I am able to set up one virtual host that works with > > >> > mongrel no problem. The issue is when I set up additional ones I > > >> > cannot get to them. I look in the log file of the first app and it > is > > >> > trying to go there. > > >> > Does anyone know how to set up multiple virtual hosts with rails? > > > > >> -- > > >> Thomas R. "TomK32" Koll <>http://ananasblau.com > > >> just a geek trying to change the world > > >>http://github.com/TomK32 > > > > Hi, are you using a different ServerName for each virtual host? Also, > did > > you > > correctly configure the equivalent of Unix hosts'' file under Windows? > > > > -Conrad >Hi, I''m not a Windows expert but I believe that you do have to modify the hosts'' file to contain all the server names contained in your virtual hosts'' file. -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
My server is local. IP address on my netowrk at home. I go to IP/?? for my rails apps On Sat, Jan 31, 2009 at 9:30 AM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Sat, Jan 31, 2009 at 7:20 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Do you need to modify the hosts file if I go to my server address? Yes > > i have a different ServerName for each one. > > So are you accessing your server by IP address or host name? > If it''s the former you have to use a different IP for each virtual host. > > Perhaps you should post the relevant parts of your conf files. > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 7:33 AM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My server is local. IP address on my netowrk at home. I go to IP/?? for > my rails appsIf you want to use Named Virtual Hosts, then those names need to be resolvable, though DNS, NIS, your local hosts file -- something. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK, well like in the previous replies, the first one works no problem it is the ones after in the file that do not work. On Jan 31, 9:49 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 7:33 AM, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > My server is local. IP address on my netowrk at home. I go to IP/?? for > > my rails apps > > If you want to use Named Virtual Hosts, then those names need to > be resolvable, though DNS, NIS, your local hosts file -- something. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 7:50 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > OK, well like in the previous replies, the first one works no problem > it is the ones after in the file that do not work.The "first one" /what/? Hostname? Is that the actual hostname of your computer? A minute ago you said you were accessing your server by IP address. Which is it? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The first virtual host. My sever locally is ex. 192.168.1.1 I go to 192.168.1.1/myapp1 that app in my vitual host works If I go to 192.168.1.1/myapp2 it says page cannot be displayed. It is the rails error page coming from myapp1. On Jan 31, 9:54 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 7:50 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > OK, well like in the previous replies, the first one works no problem > > it is the ones after in the file that do not work. > > The "first one" /what/? Hostname? Is that the actual hostname of > your computer? A minute ago you said you were accessing your > server by IP address. Which is it? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 8:01 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The first virtual host. > > My sever locally is ex. 192.168.1.1 > > I go to 192.168.1.1/myapp1 > > that app in my vitual host works > > If I go to 192.168.1.1/myapp2The above has exactly nothing to do with "virtual hosts", so I''m not sure where your subject line comes from. If you''re trying to "fix" the above situation with virtual host directives, you''re going to be badly disappointed :-) You need appropriate proxy settings for your *one* host. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
OK I was trying to avoid pasting the virtual hsots file but here it goes: NameVirtualHost *:80 <VirtualHost *:80> ServerName employeedb DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" RewriteEngine On <Directory "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public">Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ProxyRequests Off ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ ProxyPreserveHost on </VirtualHost> <VirtualHost *:80> ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/ Turindata/public" <Directory "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/ Turindata/public" > Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ProxyRequests Off ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ </VirtualHost> On Jan 31, 10:08 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 8:01 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > The first virtual host. > > > My sever locally is ex. 192.168.1.1 > > > I go to 192.168.1.1/myapp1 > > > that app in my vitual host works > > > If I go to 192.168.1.1/myapp2 > > The above has exactly nothing to do with "virtual hosts", so I''m not > sure where your subject line comes from. If you''re trying to "fix" the > above situation with virtual host directives, you''re going to be badly > disappointed :-) > > You need appropriate proxy settings for your *one* host. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 8:11 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ServerName employeedb> ServerName turindataMight work -- if you were accessing your server /using those names/ e.g. http://employeedb/ and http://turindata/ So either do that, or dump all the virtual host stuff and fix your proxy settings to respond to the format e.g. http://192.168.1.1/myapp1, if that''s what you want. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok, well this is where it gets odd, like I said before I can go to: I have my local server set up for http requests from my router. I can go to: http://192.168.1.1/turindata no problem the other app bombs On Jan 31, 10:19 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 8:11 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > ServerName employeedb > > ServerName turindata > > Might work -- if you were accessing your server /using those names/ > e.g.http://employeedb/ andhttp://turindata/ > > So either do that, or dump all the virtual host stuff and fix your proxy > settings to respond to the format e.g.http://192.168.1.1/myapp1, if > that''s what you want. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 8:22 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Ok, well this is where it gets odd, like I said before I can go to:It''s not "odd" at all. You''re seeing the first app that matches as the default. That is NOT an indication that it''s "working", even partially. If you don''t use the defined server names to access your app, the current configuration *WILL NOT WORK*. I suggest you first make up your mind how you want to access your server, as two virtual hosts, or 1 host with separate apps as you''re apparently attempting now. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
huh, well I am doing it according to the apache docs. the *:80 routes all traffic from port 80 and the ServerName differentiates between the different virtual hosts. I go to http://192.168.1.1/turindata I should be able to go to http://192.168.1.1/employeedb If this is not correct can you please instruct me how to make this happen somehow? I am not an apache guru just trying to go by the rails stuff I have found and apache docs. On Jan 31, 10:38 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 8:22 AM, Me <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Ok, well this is where it gets odd, like I said before I can go to: > > It''s not "odd" at all. You''re seeing the first app that matches as the > default. That is NOT an indication that it''s "working", even partially. > > If you don''t use the defined server names to access your app, the > current configuration *WILL NOT WORK*. > > I suggest you first make up your mind how you want to access your > server, as two virtual hosts, or 1 host with separate apps as you''re > apparently attempting now. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 8:46 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > huh, well I am doing it according to the apache docs.> I go to http://192.168.1.1/turindata > I should be able to go to http://192.168.1.1/employeedbOne more time -- the above has nothing to do with "virtual hosts". Nothing. At. All. Let''s try again. Check one, and only one: [ ] I want to access my apps as separate virtual hosts, as in: http://employeedb/ http://turindata/ [ ] I want to access my apps on one host, in this case ''192.168.1.1'', using different paths: http://192.168.1.1/turindata http://192.168.1.1/employeedb Those are your choices. Either is easily implemented. Just make up your mind. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
IP/app IP/app1 Not sure how to do it using mongrel on apache. All I have seen it doing it with virtual hosts. proxy to mongrel and back. On Sat, Jan 31, 2009 at 10:56 AM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Sat, Jan 31, 2009 at 8:46 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > huh, well I am doing it according to the apache docs. > > > I go to http://192.168.1.1/turindata > > I should be able to go to http://192.168.1.1/employeedb > > One more time -- the above has nothing to do with "virtual hosts". > Nothing. At. All. Let''s try again. > > Check one, and only one: > > [ ] I want to access my apps as separate virtual hosts, as in: > http://employeedb/ > http://turindata/ > > [ ] I want to access my apps on one host, in this case ''192.168.1.1'', > using different paths: > http://192.168.1.1/turindata > http://192.168.1.1/employeedb > > Those are your choices. Either is easily implemented. > > Just make up your mind. > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 9:01 AM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> IP/app > IP/app1OK, dump all the virtual host stuff you''re not using and under the default host put something like: ProxyPass /app/ http://localhost:3000/ ProxyPassReverse /app/ http://localhost:3000/ ProxyPass /app1/ http://localhost:3001/ ProxyPassReverse /app1/ http://localhost:3001/ Done. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Start page works but all of my links do not work. On Jan 31, 11:10 am, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 31, 2009 at 9:01 AM, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > IP/app > > IP/app1 > > OK, dump all the virtual host stuff you''re not using and under the > default host put something like: > > ProxyPass /app/http://localhost:3000/ > ProxyPassReverse /app/http://localhost:3000/ > > ProxyPass /app1/http://localhost:3001/ > ProxyPassReverse /app1/http://localhost:3001/ > > Done. > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 11:51 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Start page works but all of my links do not work.Right, you''ll need to set a prefix on all your routes -- I''ve done that once, but don''t recall the incantation at the moment. Google should help. Or, much easier, just use virtual hosts, like most folks do :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ya, virtual hosts is what I am trying to do. here is the one that does not work: Any ideas? <VirtualHost *:80> ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/Turindata/public" RewriteEngine On <Directory "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/Turindata/public" > Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ </VirtualHost> On Sat, Jan 31, 2009 at 3:48 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Sat, Jan 31, 2009 at 11:51 AM, Me <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Start page works but all of my links do not work. > > Right, you''ll need to set a prefix on all your routes -- I''ve done that > once, but don''t recall the incantation at the moment. Google should > help. > > Or, much easier, just use virtual hosts, like most folks do :-) > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 2:02 PM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ya, virtual hosts is what I am trying to do. here is the one that does not > work: Any ideas?It "doesn''t work" because you haven''t, as far as I can tell, tried it. http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata If you don''t request the virtual server you''ve defined, what makes you think that it will magically respond to some entirely different and unrelated request URL? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well the virtual host above works: <VirtualHost *:80> ServerName employees DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ </VirtualHost> I go to http://IP/employees and I get the index page which is what it should do. The other one says: Routing Error No route matches "/turindata" with {:method=>:get} On Sat, Jan 31, 2009 at 4:16 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Sat, Jan 31, 2009 at 2:02 PM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Ya, virtual hosts is what I am trying to do. here is the one that does > not > > work: Any ideas? > > It "doesn''t work" because you haven''t, as far as I can tell, tried it. > > http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata > > If you don''t request the virtual server you''ve defined, what makes > you think that it will magically respond to some entirely different and > unrelated request URL? > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, Jan 31, 2009 at 2:21 PM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well the virtual host above works:No. It. Doesn''t. It ONLY APPEARS TO. Do you understand the concept of "default"?> I go to http://IP/employeesAs long as you insist on trying to configure "virtual hosts" and NOT USING THE VIRTUAL HOST NAME, you are wasting your time. Last try: http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata NOT. THE. SAME. If you can''t understand that, I give up. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Do you mean this statement? NameVirtualHost *:80 I have that there. The apache docs say that statement routes all traffic on port 80 to the virtual hosts. If thee is something I am missing please let me know. I have this: NameVirtualHost *:80 ProxyRequests Off <VirtualHost *:80> ServerName employees DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ </VirtualHost> <VirtualHost *:80> ServerName turindata DocumentRoot "F:/BACKUP/Backup/Subversion Server/httpd/deploy_apps/Turindata/public" RewriteEngine On ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ </VirtualHost> I go to this on each one: http://192.168.1.1/employees -> works http://192.168.1.1/turindata -> does not work On Sat, Jan 31, 2009 at 4:38 PM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Sat, Jan 31, 2009 at 2:21 PM, Chris Habgood <chabgood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Well the virtual host above works: > > No. It. Doesn''t. It ONLY APPEARS TO. Do you understand the > concept of "default"? > > > I go to http://IP/employees > > As long as you insist on trying to configure "virtual hosts" and NOT > USING THE VIRTUAL HOST NAME, you are wasting your time. > > Last try: > > http://turindata/ is NOT THE SAME AS http://192.168.1.1/turindata > > NOT. THE. SAME. > > If you can''t understand that, I give up. > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Chris, In case you haven''t already solved this problem of running multiple rails apps under the same domain via apache, ... try mod''ing your app- specific proxypass/reverse directives like: ... ProxyPass /employees http://localhost:3000/employees ProxyPassReverse /employees http://localhost:3000/employees ... ProxyPass /turindata http://localhost:3001/turindata ProxyPassReverse /turindata http://localhost:3001/turindata ... Reload or restart apache, and you should then be able to hit those two apps as intended: http://192.168.1.1/employees http://192.168.1.1/turindata The only other issue you might have, depending on what those two apps do and how they''re implemented, is dealing with in-app static file ref''s not being found/returned via apache. For example say the employees app had the following img ref in one of the view templates: ... <img src="/images/some-img.png" .... If you were hitting that app via localhost, your browser would fetch that img from http://localhost:3000/images/some-img.png. Under your apache setup, that file would be fetched from http://192.168.1.1/images/some-img.png. So, you''ll likely need to setup your apps / apache / sys in a way that apache can find/return those static public files ref''d by each app proxy''d under that one domain (since you''re wanting to serve those apps under the same domain). There are a number of ways to deal with this, both via apache directives and rails app/config tweaks, but one fairly easy agnostic (?) kludge is to just use symbolic links: (following is unix/linux example, but should be translatable to windows) ### create sym link to app''s pub dir under that pub dir: $ cd /path-to-employees-app/public $ ln -s . ./employeespub ### create sym link to app''s pub dir under main virt host domain documentroot: $ cd /path-to-domain-documentroot/htdocs $ ln -s /path-to-employees-app/public ./employeespub ### then make sure your app''s static file refs point to that new sym- link: ... <img src="/employeespub/images/some-img.png" ... ### done. After that, all of your app-specific static file refs should work under both localhost (ie http://localhost:3000/employeespub/images/some-img.png) and apache (ie http://192.168.1.1/employeespub/images/some-img.png). Jeff On Jan 31, 2:43 pm, Chris Habgood <chabg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Do you mean this statement? > > NameVirtualHost *:80 > > I have that there. > > The apache docs say that statement routes all traffic on port 80 to the > virtual hosts. > > If thee is something I am missing please let me know. > > I have this: > > NameVirtualHost *:80 > ProxyRequests Off > > <VirtualHost *:80> > ServerName employees > DocumentRoot "F:/BACKUP/Backup/Web_apps_svn_working/employeedb/public" > > ProxyPass /http://localhost:3000/ > ProxyPassReverse /http://localhost:3000/ > > </VirtualHost> > > <VirtualHost *:80> > ServerName turindata > DocumentRoot "F:/BACKUP/Backup/Subversion > Server/httpd/deploy_apps/Turindata/public" > RewriteEngine On > > ProxyPass /http://localhost:3001/ > ProxyPassReverse /http://localhost:3001/ > > </VirtualHost> > > I go to this on each one: > > http://192.168.1.1/employees-> works > http://192.168.1.1/turindata-> does not work > ...(snip)...--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---