1

Here's my setup: I have an apache server running a number of virtual hosts, each of them using PHP. I now have a rails app I want to install to a subdirectory for one of the sites (a subdomain would be adequate as a fall-back).

From what I've read so far, as soon as I install libapache2-mod-passenger all the sites by default will use passenger rather than PHP. Is there a way around this, barring setting a PassengerEnabled off directive in each site config file?

Jack
  • 121
  • 5
  • You are misunderstanding the way Apache deals with preprocessor/executable-code modules. PHP will be interpreted by the module designated to handle PHP scripts. Passenger/Ruby applications must be explicitly configured (all requests for the specified directory is handed over to Passenger). If you do not explicitly configure a directory to be handled through Passenger it is handled according to the remainder of your Apache configuration. – voretaq7 Feb 18 '13 at 19:46
  • there seems to be a lot of conflicting information on this, with many articles claiming that PHP gets uninstalled when passenger is installed. – Jack Feb 19 '13 at 08:15
  • I'm not sure where the people writing those articles are getting their information - there is nothing mutually exclusive about the two technologies (I have production servers with PHP, Passenger, and mod_perl all coexisting). – voretaq7 Feb 19 '13 at 16:31

1 Answers1

1

As per these instructions, I installed passenger as a gem. The instructions omitted the need to run passenger-install-apache2-module which basically walked me through the entire process.

With this setup, PHP is untouched, and Rails apps can even be configured to run in subfolders within a PHP site.

Jack
  • 121
  • 5