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 ? 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.. thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
I am currently working on porting an old PHP application to Rails. Except it was decided not to do it all in one fell swoop but over time, so I have to get the old PHP app and the new Rails app to play together. In short, yes, it is quite possible but you gotta know how to use mod_rewrite and other apache config bits. In my case though, I''m using litespeed, so it''s a different setup. The way I have it setup is basically having the PHP app sitting there and anything that falls through be handled by Rails. It wasn''t that hard to setup. What was harder was (somewhat) harder was getting sessions to work together and other things like that. Hope it helps, -carl On 10/6/06, Sergio Ruiz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 ? > > 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.. > > thanks! > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Sergio Ruiz wrote:> 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 ? > > 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.. > > thanks! > >Read more about mod_rewrite in Apache. This solve your problem. -- Davis <daviscabral-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Impact Media -- C: +55 45 9928 0815 B: http://impactmedia.com.br/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
>> > Read more about mod_rewrite in Apache. > This solve your problem. >thanks, guys.. i will check this out... -- 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 -~----------~----~----~----~------~----~------~--~---
> 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> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---