<VirtualHost *:80>
#stuff for your rails site
</VirtualHost>
<VirtualHost *:4000>
#stuff for your php site.
</VirtualHost>
Fred
--
Posted via http://www.ruby-forum.com/.
Yes...
http://groups.google.com/group/rubyonrails-talk/msg/99b36051504f783f
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-mai...@andreas-s.net
> <mailto:rails-mai...@andreas-s.net>> 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
lanc...@rbsinteractive.com
<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:
/ 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
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
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
mort...@dgrmm.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFFOkUSUy30ODPkzl0RAu/2AJ0T+oxl9QdGsCmC+L/xrES4GtHk9QCgrZrz
79CT9E5xeK9vbEOMnTlglAo=
=0DDL
-----END PGP SIGNATURE-----