I am currently working on a website where the core of the website is in PHP. I now want to write a bunch of applications on top of that core, and was hoping to do it in Rails. I saw a couple things online where you could set single folders to be handled by PHP, (example: http://macdiggs.com/2007/06/29/using-php-inside-rails-structure-on-apache/) but I am hoping to do the opposite, have single folders that are handled by Rails, and then the rest is handled by PHP. For example, having ourwebsite.com/blog as a Rails app, but ourwebsite.com and ourwebsite.com/internal are all in PHP. What kind of Apache configurations would let this happen?
(As a bonus, my server is managed by Plesk, so I am concerned about making straight changes to the apache configuration. I have root access, so I can do it, but I am worried that Plesk might get mad)
EDIT: I should also mention, I am using Subdomains as part of my application, so I would really prefer to have something like ourwebsite.com/rails_app. If that is the only option, I can go that route, but I would prefer not to.
2
Answers
I am working on a project and its having some blog in php ie wordpress and application in rails. Just configured it an hour before. Might help you.
If you want the PHP app to be default application and only use Rails for a subdirectory, this Apache configuration should work for you:
Note that your rails application would be running on port 3000 and you will need the ProxyPass Apache module installed.