Cant configure Apache with Passenger + Rails

Alexkd asked:

I am only beginner and try to understand how to configure apach web-server for my RubyOnRails app. I have linux, installed apache2, passenger and apache2-module for passenger. While installing i got text like this

LoadModule passenger_module /home/rubys/.rvm/.../ext/apache2/
PassengerRoot /home/rubys/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8
PassengerRuby /home/rubys/.rvm/wrappers/ruby-1.9.2-p290/ruby

I need add this to my apache config file, so, i use

$ apachectl -V | grep HTTPD_ROOT
$ apachectl -V | grep SERVER_CONFIG_FILE

file, which i need is here


my rails app is here


Also i have file in /etc/apache2/ports.conf with text like this

NameVirtualHost *:80

What I have to copy to my apache2.conf? and where i have to add this:

<VirtualHost *:80>
   DocumentRoot /home/alexkd/WebDev/rails/depot
   <Directory /home/alexkd/WebDev/rails/depot>
     AllowOverride all
     Options -MultiViews

My answer:

Your DocumentRoot must be set to the public directory of your Rails app.

For instance (it seems you’re trying out the demo from the Rails book):

   DocumentRoot /home/alexkd/WebDev/rails/depot/public

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.