Site5 - Built For Designers & Developers MENU
Home  ›  Ruby & Ruby On Rails  ›  Ruby: Run a PHP application from within a Rails sub-folder

Ruby: Run a PHP application from within a Rails sub-folder

Comments Off on Ruby: Run a PHP application from within a Rails sub-folder

In certain situations, you may want to run a PHP application (like WordPress) from within a sub-folder that has a rails application installed above it. This can be accomplished by using a htaccess file in the sub-folder where the PHP application is to be installed.

These instructions require SSH access, so we’re assuming a basic familiarity with the command line and a text editor (nano, vim, emacs, etc)

1) First, navigate to the sub-directory where your PHP application is to be installed

2) Open up a file called .htaccess (note the initial dot) in your preferred text editor and add the following line:

PassengerEnabled off

3) Save the file and close the text editor

That’s it! We should now able to install a PHP application into this sub-folder without any interference from the Rails application above it. Most PHP applications will automatically overwrite the .htaccess file with their own, so after installation you should open the .htaccess file and make sure that the PassengerEnabled off line is still there, and re-add it at the top of the file if it’s not.

 

Still have a question? Or need help?
If you need technical support with your account, please email us or chat live with a representative.

Comments are closed.

Money Back Guarantees