I''m kinda newb when it comes to apache. I''ve been tasked with creating a website to manage some local web applications. This site will be running just on our local LAN (it will _never_ be accessed from outside this LAN). We have Kubuntu 7.10 running on this machine and need a setup that enables us to do the following: 1. Root website - http://ip.address.of.machine A basic web page that will have links to different web applications that we will create 2. Rails app 1 - http://ip.address.of.machine/railsapp1 A Rails app 3. Rails app 2 - http://ip.address.of.machine/railsapp2 Another Rails app 4. Django app 1 - http://ip.address.of.machine/djangoapp1 A Django app .... The URLs I have denoted are what I envision, although in reality I guess they could (should?) be different (http://railsapp1, http://djangoapp1, etc.) Initially, I don''t think I''ll need a mongrel_cluster or anything of the like, chances are at most 10 people could be accessing these apps at once, and in reality probably no more than 2-4 at any given time. Again, I''m a complete newb when it comes to apache config files (<VirtualHost> and the like). I can find gobs of howto''s on deploying 1 app or the other, but not for the custom setup I have described above. If I need to break down and buy an Apache book and spend a month or two learning, I guess I can. --~--~---------~--~----~------------~-------~--~----~ 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 Feb 11, 2008 8:46 AM, Reacher <brandon.g.jones-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The URLs I have denoted are what I envision, although in reality I > guess they could (should?) be different (http://railsapp1, http://djangoapp1,should. For both your users'' sake, and in case you want/need to move an app to another machine.> Again, I''m a complete newb when it comes to apache config files > (<VirtualHost> and the like). I can find gobs of howto''s on deploying > 1 appOK, deploy one. Test. Deploy second app. Test. Deploy... :-) Seriously, there''s not that much to configuring a mod_proxy setup, and multiple proxies, even within one virtual host, are just a couple more lines. Try it, come back if you have specific questions. -- 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 -~----------~----~----~----~------~----~------~--~---
I''m using Hostingrails.com and had to create a symbolic link that redirects to the app from the console. Read this tutorial to see how ->Make your app''s public folder the public_html http://www.hostingrails.com/forums/wiki_thread/1#symlink On Feb 11, 11:46 am, Reacher <brandon.g.jo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m kinda newb when it comes to apache. I''ve been tasked with > creating a website to manage some local web applications. This site > will be running just on our local LAN (it will _never_ be accessed > from outside this LAN). We have Kubuntu 7.10 running on this machine > and need a setup that enables us to do the following: > > 1. Root website -http://ip.address.of.machine > A basic web page that will have links to different web applications > that we will create > 2. Rails app 1 -http://ip.address.of.machine/railsapp1 > A Rails app > 3. Rails app 2 -http://ip.address.of.machine/railsapp2 > Another Rails app > 4. Django app 1 -http://ip.address.of.machine/djangoapp1 > A Django app > .... > > The URLs I have denoted are what I envision, although in reality I > guess they could (should?) be different (http://railsapp1,http://djangoapp1, > etc.) Initially, I don''t think I''ll need a mongrel_cluster or > anything of the like, chances are at most 10 people could be accessing > these apps at once, and in reality probably no more than 2-4 at any > given time. > > Again, I''m a complete newb when it comes to apache config files > (<VirtualHost> and the like). I can find gobs of howto''s on deploying > 1 app or the other, but not for the custom setup I have described > above. If I need to break down and buy an Apache book and spend a > month or two learning, I guess I can.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
VirtualHost is your friend... Apache config(there is more to this but this should get you started... ): PS You should have a include directive in the main conf/httpd.conf and add conf files for each of the apps in conf/extra/httpd-app1.conf. This way you can move/add or disable single apps to apache. <Proxy balancer://app1_cluster> BalancerMember http://127.0.0.1:8100 </Proxy> <Proxy balancer://app2_cluster> BalancerMember http://127.0.0.1:8200 </Proxy> NameVirtualHost *:80 <VirtualHost *:80> ServerName app1 <Directory "/opt/rails_apps/app1/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/app1(.*)$ balancer://app1_cluster%{REQUEST_URI} [P,QSA,L] </VirtualHost> <VirtualHost *:80> ServerName app2 <Directory "/opt/rails_apps/app2/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/app2(.*)$ balancer://app2_cluster%{REQUEST_URI} [P,QSA,L] </VirtualHost> Start Mongrels as needed like this(Read about Monit to manage this better): /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production --user daemon --group daemon -p 8100 -a 127.0.0.1 -P /opt/ rails_app/app1/shared/pids/mongrel.8100.pid -c /opt/rails_app/app1/ current -l log/mongrel.8100.log --prefix /app1 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks everyone for the tips. I did get a single rails app deployed on our Linux system using Apache2 and FastCGI. I''m not at work now, but tomorrow I will post what I did to get it to work. On Feb 11, 4:38 pm, heimdull <fre...-RCI/mp9mI1I6GGFevw1D/A@public.gmane.org> wrote:> VirtualHost is your friend... > > Apache config(there is more to this but this should get you > started... ): > > PS You should have a include directive in the main conf/httpd.conf and > add conf files for each of the apps in conf/extra/httpd-app1.conf. > This way you can move/add or disable single apps to apache. > > <Proxy balancer://app1_cluster> > BalancerMemberhttp://127.0.0.1:8100 > </Proxy> > > <Proxy balancer://app2_cluster> > BalancerMemberhttp://127.0.0.1:8200 > </Proxy> > > NameVirtualHost *:80 > > <VirtualHost *:80> > ServerName app1 > > <Directory "/opt/rails_apps/app1/public"> > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > </Directory> > > RewriteEngine on > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/app1(.*)$ balancer://app1_cluster%{REQUEST_URI} > [P,QSA,L] > > </VirtualHost> > <VirtualHost *:80> > ServerName app2 > > <Directory "/opt/rails_apps/app2/public"> > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > </Directory> > > RewriteEngine on > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/app2(.*)$ balancer://app2_cluster%{REQUEST_URI} > [P,QSA,L] > > </VirtualHost> > > Start Mongrels as needed like this(Read about Monit to manage this > better): > > /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e > production --user daemon --group daemon -p 8100 -a 127.0.0.1 -P /opt/ > rails_app/app1/shared/pids/mongrel.8100.pid -c /opt/rails_app/app1/ > current -l log/mongrel.8100.log --prefix /app1--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---