hybrid website? php and rails..

i am writing a new app in rails that i need to run on an existing domain..

the problem is, there are a few subdirectories on that domain that run a few old (but necessary) php scripts and a few other things that still need to be accessible..

is it possible to set up apache so that i can run my rails app using mod-proxy, but still retain access to the old directories in ~/public_html ?

Yes.

the only thing i would do is make sure that there is no directory name overlap in the system..

for example.. i couldn't have /scripts in both apps.. which is fine..

i would appreciate any help in getting this set up..

This is what we use and it works fine. (apache2/mongrel)

<VirtualHost *:80>

    ServerName myserver.com     DocumentRoot /path/to/my/app/public

    <Directory "/path/to/my/app/public">       Options FollowSymLinks       AllowOverride None       Order allow,deny       Allow from all     </Directory>

    <Proxy balancer://mongrel_cluster>       BalancerMember http://127.0.0.1:8805     </Proxy>

    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 ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

    AddOutputFilterByType DEFLATE text/html     AddOutputFilterByType DEFLATE application/x-javascript     AddOutputFilterByType DEFLATE text/css     AddOutputFilterByType DEFLATE text/plain     AddOutputFilterByType DEFLATE text/xml     AddOutputFilterByType DEFLATE application/xml     AddOutputFilterByType DEFLATE application/xhtml+xml

    BrowserMatch ^Mozilla/4 gzip-only-text/html     BrowserMatch ^Mozilla/4.0[678] no-gzip     BrowserMatch bMSIE !no-gzip !gzip-only-text/html

    php_value include_path /path/to/my/app/php:/usr/local/lib/php:.     php_value auto_prepend_file /path/to/my/app/php/auto_prepend.php

    # this not only blocks access to .svn directories, but makes it appear     # as though they aren't even there, not just that they are forbidden     <DirectoryMatch "^/.*/\.svn/">       ErrorDocument 403 /404.html       Order allow,deny       Deny from all       Satisfy All     </DirectoryMatch>

</VirtualHost>