# Pre-existing PHP, Apache web server, and mySQL setup

**URL:** <https://www.ruby-forum.com/t/pre-existing-php-apache-web-server-and-mysql-setup/113786>\
**Category:** Rails\
**Created:** [September 4, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/pre-existing-php-apache-web-server-and-mysql-setup/113786 "2007-09-04T23:27:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rh001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f6c823/32.png) [@rh001](https://www.ruby-forum.com/u/rh001)\
**Post date:** [September 4, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/pre-existing-php-apache-web-server-and-mysql-setup/113786/1 "2007-09-04T23:27:38Z")

</div>

Hello All,

I currently have a PHP setup for testing scripts and PHP code on my  
main machine:  
PHP  
Apache web server  
mySQL

Can I download the Ruby on Rails package that includes the above  
mentioned and just install it to the same machine?  
What is the specific procedure to successfully set up the Ruby on  
Rails package AND still be able to test my simple PHP scripts on the  
same machine?

Thanks!

---

<div class="post-metadata">

**Author:** ![rh001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f6c823/32.png) [@rh001](https://www.ruby-forum.com/u/rh001)\
**Post date:** [September 5, 2007, 12:42am UTC](https://www.ruby-forum.com/t/pre-existing-php-apache-web-server-and-mysql-setup/113786/2 "2007-09-05T00:42:47Z")

</div>

Hello there,

USUALLY (depends on your experience with rails/apache-setups):

- usually you run rails by running Mongrel on port300x
- usually you run RoR through an Apache-VirtualHost that’s meant  
specifically for running the Rails-Application
- usually you use Apache to Proxy requests to this Virtualhost through  
to the Mongrel-server.
- usually you can run your php-scripts on another VirtualHost on the  
same Apache-Installation
- by using Rewrite-Statements you could run php-scripts directly in  
the same Virthost, but I wouldn’t recommend mixing two languages in  
the same host-setup.
- usually you should depart from these setups only if you have the  
above working and know what you are doing.

Please google for “mongrel apache proxy” for more information

good luck,  
phil

---

<div class="post-metadata">

**Author:** ![rh001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f6c823/32.png) [@rh001](https://www.ruby-forum.com/u/rh001)\
**Post date:** [September 5, 2007, 12:49am UTC](https://www.ruby-forum.com/t/pre-existing-php-apache-web-server-and-mysql-setup/113786/3 "2007-09-05T00:49:48Z")

</div>

This would walk you through it and explain why you’re doing every  
step:  
[http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/](http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/)

Helzer
