1

Is this possible to do in apache?

I need to have a rails site, with a subdirectory controlled by PHP, or have a PHP site with a subdirectory that is a rails application. Is this possible?

I used to do it all the time in IIS but not sure about apache.

2 Answers 2

1

It's definitely possible.

If you're using Passenger in Apache, you're after the RailsBaseURI option - follow the link for an example VirtualHost. If you're using a separate Ruby app-server (Mongrel, Thin, etc) then you can just use Apache's mod_proxy to point to the port on which it's running.

2
  • I am using passenger. I'll take a look at that, thanks.
    – fregas
    Mar 31, 2011 at 22:27
  • So this seems to be able to make a rails site go under a php site. Is there a way to do the reverse?
    – fregas
    Apr 7, 2011 at 22:44
0

I don't have experience with Ruby but you can use mod_proxy under apache to send subdirectories to different locations. So you would have a normal site running php/apache and then proxy /foo to mongrel on a different port.

Apache Mod_Proxy Documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .