Re: Apache 2 + Passenger + RoR3 + newbie

No, you only have to create a virtual host if you want more than one website served up by Apache, if your RoR site is the ONLY site to be served by Apache/Passenger, you don't need to create a virtual host.

It looked like you ADDED the code you posted, but it sounds like you REPLACED the previous code with what you commented at the bottom.

I think you'd need to post your httpd.conf to see what the problem is, but you're not configured correctly because Passenger can't find config/environment.rb

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Apache 2 + Passenger + RoR3 + newbie

I think I understand what is going on, you have several PHP based sites, and you want to deploy a RoR site that is aware of the PHP sites, and ALL of these sites will be deployed on a single Apache/Passenger configuration, is that correct?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

I think I understand what is going on, you have several PHP based sites, and you want to deploy a RoR site that is aware of the PHP sites, and ALL of these sites will be deployed on a single Apache/Passenger configuration, is that correct?

Exactly. In fact, i already have some websites in php (and it works fine) and i want to add a website in a subdirectory in rails.

Re: Apache 2 + Passenger + RoR3 + newbie

OK, then be aware that when you deploy a Rails site and another site on apache, they will have no knowledge of each other at the apache level, as far as apache is concerned, they are just two stand alone websites. In that case you will need at least TWO virtual hosts in the Apache config.

I've never deployed a php site, so I don't know how that is done, it sounds like there is some method to deploy multiple PHP sites as ONE Apache website. If that's the case, then you'll still need TWO virtual hosts, one to deploy the Rails site, one to deploy the multiple PHP sites. But again , I'm not sure.

What I think you need to do is FIRST get the rails site deployed as a virtual host, that's what I posted. In my httpd.conf where I deploy multiple RoR websites, the last line is:

Include etc/httpd/virtualhosts/*.conf

There is only ONE file in that directory, and in that file there are multiple versions of what I posted earlier, one after the other, the only difference between each is the url of the website and the location of the rails root directory. I think you need to do something similar, you need to take all the website specific stuff in your apache2.conf, and converting into a VirtualHost definition, you don't have to seperate it into a seperate file and include it, you just need to end up with your apache2.conf file looking something like

LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-\3.0.11/ext/apache2/mod_passenger.so
... a bunch of other stuff
<VirtualHost *:80>
# the definition of the rails site, like I posted earlier
</VirtualHost>
<VirtualHost *:80>
# the definition of one (or more???) of your php site(s)
</VirtualHost>

The knowledge that the rails site has of your OTHER PHP sites will exist ONLY in the rails site, Apache will know nothing about it!

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.