I''ve got an Apache + PHP website and I''d like it to work side by side with Rails using Mongrel. How do I configure httpd.conf (without using a cluster) to forward rails requests to Mongrel and let the php ones continue working as is? Is this possible? Here''s the basic setup: File system: apache/htdocs - contains all the php scripts railsproj/public - public rails project folder HTTP settings: http://www.example.com/ -> apache/htdocs http://www.example.com:4000 -> railsproj/public Thanks, Shimon Amit --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
We do something a little like that. There may be other ways, but we''ve used virtual hosts, ie <VirtualHost *:80> #stuff for your rails site </VirtualHost> <VirtualHost *:4000> #stuff for your php site. </VirtualHost> Fred -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
But doesn''t that mean that the end user has to enter the port number ( www.example.com:4000) in his browser? How can I configure it so that www.example.com/[anything/].php goes to the php parser and everything else goes to mongrel/rails? On 10/18/06, Frederick Cheung <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > We do something a little like that. There may be other ways, but we''ve > used virtual hosts, ie > > <VirtualHost *:80> > #stuff for your rails site > </VirtualHost> > > <VirtualHost *:4000> > #stuff for your php site. > </VirtualHost> > > > Fred > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hmm, try setting up a proxy? In Apache, look at http://httpd.apache.org/docs/2.0/mod/mod_proxy.html, especially at the proxypass directive. Shimon Amit wrote:> But doesn''t that mean that the end user has to enter the port number > (www.example.com:4000 <http://www.example.com:4000>) in his browser? > How can I configure it so that www.example.com/[anything/].php > <http://www.example.com/%5Banything/%5D.php> goes to the php parser > and everything else goes to mongrel/rails? > > > On 10/18/06, *Frederick Cheung* <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org > <mailto:rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>> wrote: > > > We do something a little like that. There may be other ways, but we''ve > used virtual hosts, ie > > <VirtualHost *:80> > #stuff for your rails site > </VirtualHost> > > <VirtualHost *:4000> > #stuff for your php site. > </VirtualHost> > > > Fred > > -- > Posted via http://www.ruby-forum.com/. > > > > >-- Lance Ivy Web Applications Developer RBS Interactive lance.ivy-eTT0+Q0rEURLdZBKzJmsdNBPR1lH4CV8@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 -~----------~----~----~----~------~----~------~--~---
> I''ve got an Apache + PHP website and I''d like it to work side by side with > Rails using Mongrel. How do I configure httpd.conf (without using a > cluster) to forward rails requests to Mongrel and let the php ones continue > working as is? Is this possible?Yes... http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f> > Here''s the basic setup: > > File system: > apache/htdocs - contains all the php scripts > railsproj/public - public rails project folder > > HTTP settings: > http://www.example.com/ -> apache/htdocs > http://www.example.com:4000 -> railsproj/public > > Thanks, > Shimon Amit > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks everybody. My goal was to setup a Ruby on Rails development environment on Windows XP allowing PHP and Rails to run side by side without clustering or proxying. Here''s my summary as to how I succeeded to setup the following development environment: - Windows XP - Xampp: Apache 2.0, PHP 5, MySQL 5 - Ruby 1.8.5 - Rails 1.1.6 - Mongrel (gems: mongrel, mongrel_service) Here''s how: *INSTALLATIONS* 1) First I installed XAMPP 1.5.0-pl1. I didn''t use the most recent version because of MySQL/Ruby compatibility Issues. http://prdownloads.sourceforge.net/xampp/xampp-win32-1.5.0-pl1-installer.exe?download 2) Ruby 1.8.5 - One click installer http://www.ruby-lang.org/en/downloads 3) Rails: At the command line: *gem install rails --include-dependencies*. I used to have Ruby 1.8.2 installed and with the version of RubyGems that it came with the gem commands used to freeze. I know things still aren''t too stable with Ruby on Windows, but after I upgraded to 1.8.5 the gem command started working nicely. 4) Mongrel: *gem install mongrel_service --include-dependencies*. This will also install the mongrel gem. This gem will allow mongrel to run on Windows as a service. *CONFIGURATIONS* 1) Apache. Append the following to the httpd.conf file. Notice that I used mod_rewrite rather than mod_proxy to forward requests to mongrel. (If this is a no no, I have yet to find out!) I didn''t want to have to configure a mongrel cluster. <VirtualHost *:80> ServerName 127.0.0.1 DocumentRoot C:/path/to/rails/project <Directory "C:/path/to/rails/project"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php RewriteRule ^(.*)$ $1 [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f RewriteRule ^(.*)$ $1/index.html [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f RewriteRule ^(.*)$ $1/index.php [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d RewriteRule ^(.*)[^/]$ $1/ [QSA,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} [P,QSA,L] </VirtualHost> 2) Mongrel. This is a one-time command to run at the command prompt to install a mongrel service that will serve your rails application: *mongrel_rails service::install -N [name_of_service] -c [c:\path\to\rails\project] -p 4000 -e [development]* [name_of_service] - name of the Mongrel Windows service that will serve the rails project. [c:\path\to\rails\project] - as it says. [development] - this can be either ''development'' or ''production''. As you can guess, running on Windows with XAMPP, I was running a development environment. 3) Rails. Configure your development database in [c:\path\to\rails\project]\config\database.yml. *INITIATIONS* 1) Command line: *mongrel_rails service::start -N [name_of_service]* 2) Start Apache+MySQL with XAMPP Control Panel. 3) Go to 127.0.0.1 in your browser. *RESOURCES* Local Development Environment http://www.ridaalbarazi.com/blog/2006/06/21/local-development-environment-part-3/ Faster Is Possible (Official mongrel documentation - mongrel.rubyforge.org) http://mongrel.rubyforge.org/docs/apache.html Ruby On Rails List (Thanks Phillip) http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f Let me know if I''ve left anything out. I hope this thread will help newcomers overcome the difficulties of setting up Rails on Windows for the first time! Best, Shimon Amit On 10/18/06, Philip Hallstrom <rails-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > > I''ve got an Apache + PHP website and I''d like it to work side by side > with > > Rails using Mongrel. How do I configure httpd.conf (without using a > > cluster) to forward rails requests to Mongrel and let the php ones > continue > > working as is? Is this possible? > > Yes... > > http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f > > > > > Here''s the basic setup: > > > > File system: > > apache/htdocs - contains all the php scripts > > railsproj/public - public rails project folder > > > > HTTP settings: > > http://www.example.com/ -> apache/htdocs > > http://www.example.com:4000 -> railsproj/public > > > > Thanks, > > Shimon Amit > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Shameless plug: Take a look at LiteSpeed. It allows you to do all this and more. It''s fast, free, and you don''t need mongrel och mongrel_cluster. Rails processes can spawn - quickly - just like PHP processes, and the two can coinhabit the same server. / Peter On 19 okt 2006, at 15.39, Shimon Amit wrote:> Thanks everybody. My goal was to setup a Ruby on Rails development > environment on Windows XP allowing PHP and Rails to run side by > side without clustering or proxying. Here''s my summary as to how I > succeeded to setup the following development environment: > > - Windows XP > - Xampp: Apache 2.0, PHP 5, MySQL 5 > - Ruby 1.8.5 > - Rails 1.1.6 > - Mongrel (gems: mongrel, mongrel_service) > > Here''s how: > > INSTALLATIONS > > 1) First I installed XAMPP 1.5.0-pl1. I didn''t use the most recent > version because of MySQL/Ruby compatibility Issues. > http://prdownloads.sourceforge.net/xampp/xampp-win32-1.5.0-pl1- > installer.exe?download > > 2) Ruby 1.8.5 - One click installer > http://www.ruby-lang.org/en/downloads > > 3) Rails: At the command line: gem install rails --include- > dependencies. I used to have Ruby 1.8.2 installed and with the > version of RubyGems that it came with the gem commands used to > freeze. I know things still aren''t too stable with Ruby on > Windows, but after I upgraded to 1.8.5 the gem command started > working nicely. > > 4) Mongrel: gem install mongrel_service --include-dependencies. > This will also install the mongrel gem. This gem will allow > mongrel to run on Windows as a service. > > > CONFIGURATIONS > > 1) Apache. Append the following to the httpd.conf file. Notice > that I used mod_rewrite rather than mod_proxy to forward requests > to mongrel. (If this is a no no, I have yet to find out!) I > didn''t want to have to configure a mongrel cluster. > <VirtualHost *:80> > > ServerName 127.0.0.1 > DocumentRoot C:/path/to/rails/project > > <Directory "C:/path/to/rails/project"> > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > </Directory> > > RewriteEngine On > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d > RewriteRule ^(.+[^/])$ $1/ [R] > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php > RewriteRule ^(.*)$ $1 [QSA,L] > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f > RewriteRule ^(.*)$ $1/index.html [QSA,L] > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f > RewriteRule ^(.*)$ $1/index.php [QSA,L] > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d > RewriteRule ^(.*)[^/]$ $1/ [QSA,L] > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} [P,QSA,L] > </VirtualHost> > > 2) Mongrel. This is a one-time command to run at the command > prompt to install a mongrel service that will serve your rails > application: > > mongrel_rails service::install -N [name_of_service] -c [c:\path\to > \rails\project] -p 4000 -e [development] > [name_of_service] - name of the Mongrel Windows service that will > serve the rails project. > [c:\path\to\rails\project] - as it says. > [development] - this can be either ''development'' or ''production''. > As you can guess, running on Windows with XAMPP, I was running a > development environment. > > 3) Rails. Configure your development database in [c:\path\to\rails > \project]\config\database.yml. > > > INITIATIONS > > 1) Command line: mongrel_rails service::start -N [name_of_service] > > 2) Start Apache+MySQL with XAMPP Control Panel. > > 3) Go to 127.0.0.1 in your browser. > > > RESOURCES > > Local Development Environment > http://www.ridaalbarazi.com/blog/2006/06/21/local-development- > environment-part-3/ > > Faster Is Possible (Official mongrel documentation - > mongrel.rubyforge.org) > http://mongrel.rubyforge.org/docs/apache.html > > Ruby On Rails List (Thanks Phillip) > http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f > > > Let me know if I''ve left anything out. I hope this thread will > help newcomers overcome the difficulties of setting up Rails on > Windows for the first time! > > Best, > Shimon Amit > On 10/18/06, Philip Hallstrom <rails-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > > > > I''ve got an Apache + PHP website and I''d like it to work side by > side with > > Rails using Mongrel. How do I configure httpd.conf (without using a > > cluster) to forward rails requests to Mongrel and let the php > ones continue > > working as is? Is this possible? > > Yes... > > http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f > > > > > Here''s the basic setup: > > > > File system: > > apache/htdocs - contains all the php scripts > > railsproj/public - public rails project folder > > > > HTTP settings: > > http://www.example.com/ -> apache/htdocs > > http://www.example.com:4000 -> railsproj/public > > > > Thanks, > > Shimon Amit > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
LiteSpeed definately looks like it has prospects, but it doesn''t run on Windows. I may try it with MS Virtual PC but I''m not quite there yet. On 10/19/06, Peter Bengtson <peter-7KpGIyJoDGqUry1sbql4ngC/G2K4zDHf@public.gmane.org> wrote:> > > Shameless plug: Take a look at LiteSpeed. It allows you to do all > this and more. It''s fast, free, and you don''t need mongrel och > mongrel_cluster. Rails processes can spawn - quickly - just like PHP > processes, and the two can coinhabit the same server. > > / Peter > > On 19 okt 2006, at 15.39, Shimon Amit wrote: > > > Thanks everybody. My goal was to setup a Ruby on Rails development > > environment on Windows XP allowing PHP and Rails to run side by > > side without clustering or proxying. Here''s my summary as to how I > > succeeded to setup the following development environment: > > > > - Windows XP > > - Xampp: Apache 2.0, PHP 5, MySQL 5 > > - Ruby 1.8.5 > > - Rails 1.1.6 > > - Mongrel (gems: mongrel, mongrel_service) > > > > Here''s how: > > > > INSTALLATIONS > > > > 1) First I installed XAMPP 1.5.0-pl1. I didn''t use the most recent > > version because of MySQL/Ruby compatibility Issues. > > http://prdownloads.sourceforge.net/xampp/xampp-win32-1.5.0-pl1- > > installer.exe?download > > > > 2) Ruby 1.8.5 - One click installer > > http://www.ruby-lang.org/en/downloads > > > > 3) Rails: At the command line: gem install rails --include- > > dependencies. I used to have Ruby 1.8.2 installed and with the > > version of RubyGems that it came with the gem commands used to > > freeze. I know things still aren''t too stable with Ruby on > > Windows, but after I upgraded to 1.8.5 the gem command started > > working nicely. > > > > 4) Mongrel: gem install mongrel_service --include-dependencies. > > This will also install the mongrel gem. This gem will allow > > mongrel to run on Windows as a service. > > > > > > CONFIGURATIONS > > > > 1) Apache. Append the following to the httpd.conf file. Notice > > that I used mod_rewrite rather than mod_proxy to forward requests > > to mongrel. (If this is a no no, I have yet to find out!) I > > didn''t want to have to configure a mongrel cluster. > > <VirtualHost *:80> > > > > ServerName 127.0.0.1 > > DocumentRoot C:/path/to/rails/project > > > > <Directory "C:/path/to/rails/project"> > > Options FollowSymLinks > > AllowOverride None > > Order allow,deny > > Allow from all > > </Directory> > > > > RewriteEngine On > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d > > RewriteRule ^(.+[^/])$ $1/ [R] > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php > > RewriteRule ^(.*)$ $1 [QSA,L] > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f > > RewriteRule ^(.*)$ $1/index.html [QSA,L] > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f > > RewriteRule ^(.*)$ $1/index.php [QSA,L] > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d > > RewriteRule ^(.*)[^/]$ $1/ [QSA,L] > > > > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > > RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} [P,QSA,L] > > </VirtualHost> > > > > 2) Mongrel. This is a one-time command to run at the command > > prompt to install a mongrel service that will serve your rails > > application: > > > > mongrel_rails service::install -N [name_of_service] -c [c:\path\to > > \rails\project] -p 4000 -e [development] > > [name_of_service] - name of the Mongrel Windows service that will > > serve the rails project. > > [c:\path\to\rails\project] - as it says. > > [development] - this can be either ''development'' or ''production''. > > As you can guess, running on Windows with XAMPP, I was running a > > development environment. > > > > 3) Rails. Configure your development database in [c:\path\to\rails > > \project]\config\database.yml. > > > > > > INITIATIONS > > > > 1) Command line: mongrel_rails service::start -N [name_of_service] > > > > 2) Start Apache+MySQL with XAMPP Control Panel. > > > > 3) Go to 127.0.0.1 in your browser. > > > > > > RESOURCES > > > > Local Development Environment > > http://www.ridaalbarazi.com/blog/2006/06/21/local-development- > > environment-part-3/ > > > > Faster Is Possible (Official mongrel documentation - > > mongrel.rubyforge.org) > > http://mongrel.rubyforge.org/docs/apache.html > > > > Ruby On Rails List (Thanks Phillip) > > http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f > > > > > > Let me know if I''ve left anything out. I hope this thread will > > help newcomers overcome the difficulties of setting up Rails on > > Windows for the first time! > > > > Best, > > Shimon Amit > > On 10/18/06, Philip Hallstrom <rails-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: > > > > > > > I''ve got an Apache + PHP website and I''d like it to work side by > > side with > > > Rails using Mongrel. How do I configure httpd.conf (without using a > > > cluster) to forward rails requests to Mongrel and let the php > > ones continue > > > working as is? Is this possible? > > > > Yes... > > > > http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f > > > > > > > > Here''s the basic setup: > > > > > > File system: > > > apache/htdocs - contains all the php scripts > > > railsproj/public - public rails project folder > > > > > > HTTP settings: > > > http://www.example.com/ -> apache/htdocs > > > http://www.example.com:4000 -> railsproj/public > > > > > > Thanks, > > > Shimon Amit > > > > > > > > > > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I had looked at LiteSpeed for a production app, and the commercial version looks freaking fast. The free version looks about the same, performance-wise, as lighttpd. Lighttpd also can serve both rails and php through fcgi. Does litespeed have any advantages over lighttpd? Peter Bengtson wrote:> Shameless plug: Take a look at LiteSpeed. It allows you to do all > this and more. It''s fast, free, and you don''t need mongrel och > mongrel_cluster. Rails processes can spawn - quickly - just like PHP > processes, and the two can coinhabit the same server. > > / Peter > > On 19 okt 2006, at 15.39, Shimon Amit wrote: > > >> Thanks everybody. My goal was to setup a Ruby on Rails development >> environment on Windows XP allowing PHP and Rails to run side by >> side without clustering or proxying. Here''s my summary as to how I >> succeeded to setup the following development environment: >> >> - Windows XP >> - Xampp: Apache 2.0, PHP 5, MySQL 5 >> - Ruby 1.8.5 >> - Rails 1.1.6 >> - Mongrel (gems: mongrel, mongrel_service) >> >> Here''s how: >> >> INSTALLATIONS >> >> 1) First I installed XAMPP 1.5.0-pl1. I didn''t use the most recent >> version because of MySQL/Ruby compatibility Issues. >> http://prdownloads.sourceforge.net/xampp/xampp-win32-1.5.0-pl1- >> installer.exe?download >> >> 2) Ruby 1.8.5 - One click installer >> http://www.ruby-lang.org/en/downloads >> >> 3) Rails: At the command line: gem install rails --include- >> dependencies. I used to have Ruby 1.8.2 installed and with the >> version of RubyGems that it came with the gem commands used to >> freeze. I know things still aren''t too stable with Ruby on >> Windows, but after I upgraded to 1.8.5 the gem command started >> working nicely. >> >> 4) Mongrel: gem install mongrel_service --include-dependencies. >> This will also install the mongrel gem. This gem will allow >> mongrel to run on Windows as a service. >> >> >> CONFIGURATIONS >> >> 1) Apache. Append the following to the httpd.conf file. Notice >> that I used mod_rewrite rather than mod_proxy to forward requests >> to mongrel. (If this is a no no, I have yet to find out!) I >> didn''t want to have to configure a mongrel cluster. >> <VirtualHost *:80> >> >> ServerName 127.0.0.1 >> DocumentRoot C:/path/to/rails/project >> >> <Directory "C:/path/to/rails/project"> >> Options FollowSymLinks >> AllowOverride None >> Order allow,deny >> Allow from all >> </Directory> >> >> RewriteEngine On >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d >> RewriteRule ^(.+[^/])$ $1/ [R] >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php >> RewriteRule ^(.*)$ $1 [QSA,L] >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f >> RewriteRule ^(.*)$ $1/index.html [QSA,L] >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f >> RewriteRule ^(.*)$ $1/index.php [QSA,L] >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d >> RewriteRule ^(.*)[^/]$ $1/ [QSA,L] >> >> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >> RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} [P,QSA,L] >> </VirtualHost> >> >> 2) Mongrel. This is a one-time command to run at the command >> prompt to install a mongrel service that will serve your rails >> application: >> >> mongrel_rails service::install -N [name_of_service] -c [c:\path\to >> \rails\project] -p 4000 -e [development] >> [name_of_service] - name of the Mongrel Windows service that will >> serve the rails project. >> [c:\path\to\rails\project] - as it says. >> [development] - this can be either ''development'' or ''production''. >> As you can guess, running on Windows with XAMPP, I was running a >> development environment. >> >> 3) Rails. Configure your development database in [c:\path\to\rails >> \project]\config\database.yml. >> >> >> INITIATIONS >> >> 1) Command line: mongrel_rails service::start -N [name_of_service] >> >> 2) Start Apache+MySQL with XAMPP Control Panel. >> >> 3) Go to 127.0.0.1 in your browser. >> >> >> RESOURCES >> >> Local Development Environment >> http://www.ridaalbarazi.com/blog/2006/06/21/local-development- >> environment-part-3/ >> >> Faster Is Possible (Official mongrel documentation - >> mongrel.rubyforge.org) >> http://mongrel.rubyforge.org/docs/apache.html >> >> Ruby On Rails List (Thanks Phillip) >> http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f >> >> >> Let me know if I''ve left anything out. I hope this thread will >> help newcomers overcome the difficulties of setting up Rails on >> Windows for the first time! >> >> Best, >> Shimon Amit >> On 10/18/06, Philip Hallstrom <rails-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >> >> >> >>> I''ve got an Apache + PHP website and I''d like it to work side by >>> >> side with >> >>> Rails using Mongrel. How do I configure httpd.conf (without using a >>> cluster) to forward rails requests to Mongrel and let the php >>> >> ones continue >> >>> working as is? Is this possible? >>> >> Yes... >> >> http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f >> >> >>> Here''s the basic setup: >>> >>> File system: >>> apache/htdocs - contains all the php scripts >>> railsproj/public - public rails project folder >>> >>> HTTP settings: >>> http://www.example.com/ -> apache/htdocs >>> http://www.example.com:4000 -> railsproj/public >>> >>> Thanks, >>> Shimon Amit >>> >>> >>> >> >> >> >> > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yes. You don''t need to allocate a bunch of static FCGI workers. They are spawned as needed, and you can control the maximum allowed number of them. Also, configuring a Rails site is a doddle. As is multiple Rails apps on one server. And it''s configurable through a web interface. On 19 okt 2006, at 16.27, Jason Norris wrote:> > I had looked at LiteSpeed for a production app, and the commercial > version looks freaking fast. The free version looks about the same, > performance-wise, as lighttpd. Lighttpd also can serve both rails and > php through fcgi. Does litespeed have any advantages over lighttpd? > > Peter Bengtson wrote: >> Shameless plug: Take a look at LiteSpeed. It allows you to do all >> this and more. It''s fast, free, and you don''t need mongrel och >> mongrel_cluster. Rails processes can spawn - quickly - just like PHP >> processes, and the two can coinhabit the same server. >> >> / Peter >> >> On 19 okt 2006, at 15.39, Shimon Amit wrote: >> >> >>> Thanks everybody. My goal was to setup a Ruby on Rails development >>> environment on Windows XP allowing PHP and Rails to run side by >>> side without clustering or proxying. Here''s my summary as to how I >>> succeeded to setup the following development environment: >>> >>> - Windows XP >>> - Xampp: Apache 2.0, PHP 5, MySQL 5 >>> - Ruby 1.8.5 >>> - Rails 1.1.6 >>> - Mongrel (gems: mongrel, mongrel_service) >>> >>> Here''s how: >>> >>> INSTALLATIONS >>> >>> 1) First I installed XAMPP 1.5.0-pl1. I didn''t use the most recent >>> version because of MySQL/Ruby compatibility Issues. >>> http://prdownloads.sourceforge.net/xampp/xampp-win32-1.5.0-pl1- >>> installer.exe?download >>> >>> 2) Ruby 1.8.5 - One click installer >>> http://www.ruby-lang.org/en/downloads >>> >>> 3) Rails: At the command line: gem install rails --include- >>> dependencies. I used to have Ruby 1.8.2 installed and with the >>> version of RubyGems that it came with the gem commands used to >>> freeze. I know things still aren''t too stable with Ruby on >>> Windows, but after I upgraded to 1.8.5 the gem command started >>> working nicely. >>> >>> 4) Mongrel: gem install mongrel_service --include-dependencies. >>> This will also install the mongrel gem. This gem will allow >>> mongrel to run on Windows as a service. >>> >>> >>> CONFIGURATIONS >>> >>> 1) Apache. Append the following to the httpd.conf file. Notice >>> that I used mod_rewrite rather than mod_proxy to forward requests >>> to mongrel. (If this is a no no, I have yet to find out!) I >>> didn''t want to have to configure a mongrel cluster. >>> <VirtualHost *:80> >>> >>> ServerName 127.0.0.1 >>> DocumentRoot C:/path/to/rails/project >>> >>> <Directory "C:/path/to/rails/project"> >>> Options FollowSymLinks >>> AllowOverride None >>> Order allow,deny >>> Allow from all >>> </Directory> >>> >>> RewriteEngine On >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d >>> RewriteRule ^(.+[^/])$ $1/ [R] >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php >>> RewriteRule ^(.*)$ $1 [QSA,L] >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f >>> RewriteRule ^(.*)$ $1/index.html [QSA,L] >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f >>> RewriteRule ^(.*)$ $1/index.php [QSA,L] >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d >>> RewriteRule ^(.*)[^/]$ $1/ [QSA,L] >>> >>> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f >>> RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} >>> [P,QSA,L] >>> </VirtualHost> >>> >>> 2) Mongrel. This is a one-time command to run at the command >>> prompt to install a mongrel service that will serve your rails >>> application: >>> >>> mongrel_rails service::install -N [name_of_service] -c [c:\path\to >>> \rails\project] -p 4000 -e [development] >>> [name_of_service] - name of the Mongrel Windows service that will >>> serve the rails project. >>> [c:\path\to\rails\project] - as it says. >>> [development] - this can be either ''development'' or ''production''. >>> As you can guess, running on Windows with XAMPP, I was running a >>> development environment. >>> >>> 3) Rails. Configure your development database in [c:\path\to\rails >>> \project]\config\database.yml. >>> >>> >>> INITIATIONS >>> >>> 1) Command line: mongrel_rails service::start -N [name_of_service] >>> >>> 2) Start Apache+MySQL with XAMPP Control Panel. >>> >>> 3) Go to 127.0.0.1 in your browser. >>> >>> >>> RESOURCES >>> >>> Local Development Environment >>> http://www.ridaalbarazi.com/blog/2006/06/21/local-development- >>> environment-part-3/ >>> >>> Faster Is Possible (Official mongrel documentation - >>> mongrel.rubyforge.org) >>> http://mongrel.rubyforge.org/docs/apache.html >>> >>> Ruby On Rails List (Thanks Phillip) >>> http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f >>> >>> >>> Let me know if I''ve left anything out. I hope this thread will >>> help newcomers overcome the difficulties of setting up Rails on >>> Windows for the first time! >>> >>> Best, >>> Shimon Amit >>> On 10/18/06, Philip Hallstrom <rails-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote: >>> >>> >>> >>>> I''ve got an Apache + PHP website and I''d like it to work side by >>>> >>> side with >>> >>>> Rails using Mongrel. How do I configure httpd.conf (without >>>> using a >>>> cluster) to forward rails requests to Mongrel and let the php >>>> >>> ones continue >>> >>>> working as is? Is this possible? >>>> >>> Yes... >>> >>> http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f >>> >>> >>>> Here''s the basic setup: >>>> >>>> File system: >>>> apache/htdocs - contains all the php scripts >>>> railsproj/public - public rails project folder >>>> >>>> HTTP settings: >>>> http://www.example.com/ -> apache/htdocs >>>> http://www.example.com:4000 -> railsproj/public >>>> >>>> Thanks, >>>> Shimon Amit >>>> >>>> >>>> >>> >>> >>> >>> >> >> >>> >> >> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10/19/06, Shimon Amit <shimon.amit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks everybody. My goal was to setup a Ruby on Rails development > environment on Windows XP allowing PHP and Rails to run side by side without > clustering or proxying.No, no, no... proxying is how you are *supposed* to use Apache with Mongrel. If you don''t want use proxying then just browse directly to the port # on which you are having Mongrel serve up your Rails app. Curt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I don''t want to have to enter the port number. It is not elegant. Plus, I don''t want to make provisions for that type of URL pattern in the links (PHP links). The last line of the VirtualHost section above says: RewriteRule ^/(.*)$ http://127.0.0.1:4000%{REQUEST_URI} [P,QSA,L] This is the line that rewrites all the rails requests to mongrel. Problem is, I can''t use ProxyPass rather than RewriteRule because it does not accept regular expressions. Do you have any suggestions? Plus, why is it preferable to use mod_proxy rather than mod_rewrite with Mongrel? Thanks, Shimon On 10/20/06, Curt Hibbs <ml.chibbs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 10/19/06, Shimon Amit <shimon.amit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Thanks everybody. My goal was to setup a Ruby on Rails development > > environment on Windows XP allowing PHP and Rails to run side by side > without > > clustering or proxying. > > No, no, no... proxying is how you are *supposed* to use Apache with > Mongrel. If you don''t want use proxying then just browse directly to > the port # on which you are having Mongrel serve up your Rails app. > > Curt > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 20, 2006, at 6:35 AM, Shimon Amit wrote:> expressions. Do you have any suggestions? Plus, why is it > preferable to use mod_proxy rather than mod_rewrite with Mongrel?>As I understand it, it''s the API required... fcgi expects the web server to use that protocol which is handled by a web server module, and the rewrite is what triggers it. OTOH, mongrel is a HTTP server; it expects the proxied http request. Why don''t you want proxying? It''s already available with apache... and it works well. We have php and rails w/ mongrel working in InstantRails...>David Morton Maia Mailguard http://www.maiamailguard.com mortonda-0/IDydmJJnNeoWH0uzbU5w@public.gmane.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFOkUSUy30ODPkzl0RAu/2AJ0T+oxl9QdGsCmC+L/xrES4GtHk9QCgrZrz 79CT9E5xeK9vbEOMnTlglAo=0DDL -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I tried InstantRails but they don''t offer MySQL 5 which is a requirement. Regarding proxies, I have no objection to using them so long as I can use regular expressions (see post above) to filter requests. So far I''ve only had success with mod_rewrite and not with mod_proxy. On 10/21/06, David Morton <mortonda-0/IDydmJJnNeoWH0uzbU5w@public.gmane.org> wrote:> > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Oct 20, 2006, at 6:35 AM, Shimon Amit wrote: > > expressions. Do you have any suggestions? Plus, why is it > > preferable to use mod_proxy rather than mod_rewrite with Mongrel? > > > > As I understand it, it''s the API required... fcgi expects the web > server to use that protocol which is handled by a web server module, > and the rewrite is what triggers it. > > OTOH, mongrel is a HTTP server; it expects the proxied http > request. Why don''t you want proxying? It''s already available with > apache... and it works well. We have php and rails w/ mongrel > working in InstantRails... > > > > > David Morton > Maia Mailguard http://www.maiamailguard.com > mortonda-0/IDydmJJnNeoWH0uzbU5w@public.gmane.org > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (Darwin) > > iD8DBQFFOkUSUy30ODPkzl0RAu/2AJ0T+oxl9QdGsCmC+L/xrES4GtHk9QCgrZrz > 79CT9E5xeK9vbEOMnTlglAo> =0DDL > -----END PGP SIGNATURE----- > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---