After successfully installing the Apache 2 module, follow the next step to configure Apache.
insert the following code into the passenger file .load
LoadModule passenger_module /usr/lib/ruby/gems/1.9.2(your version)/gems /passenger-3.0.2/ext/apache2/mod_passenger.so
mkdir / etc / apache2 / mods-available / passenger.conf
insert the following code into the passenger .conf file
PassengerRoot /usr/lib/ruby/gems/1.9.2/gems/passenger-3.0.2 PassengerRuby /usr/bin/ruby1.9.2
2. Enable modules by creating the following symbolic links in / etc / apache 2 / mods-enabled
$ ln -s /etc/apache2/mods-available/passenger.load /etc/apache2/mods-enabled/passenger.load $ ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/mods-enabled/passenger.conf
3. Now create a virtual host by adding the following 000-default file to / etc / apache 2 / sites-enabled.
<Directory /var/www/your_app> RailsBaseURI /your_app RailsEnv development AllowOverride all Options -MultiViews allow from all </Directory>
Now create a soft link for your application, make sure that the application must be located in / opt. To do this, you can create a separate folder for your application.
I am. $ sudo mkdir -p / opt / rails_apps
II. $ sudo cp -R / path / to / your_app // opt / rails_apps /
III. $ sudo ln -s / opt / rails_apps / your_app / public // var / www / your_app
Then restart apache with the following command.
/etc/init.d/apache2 restart
source share