0

I am trying to install passenger for my rails app, but I dont know where is the problem.

Fallow the files:

httpd.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53
     PassengerDefaultRuby /usr/local/bin/ruby
   </IfModule>


<VirtualHost *:80>
   ServerName www.yourhost.com
   # !!! Be sure to point DocumentRoot to 'public'!
   DocumentRoot /home/vagrant/shitatta/public 
   <Directory /home/vagrant/shitatta/public>
      # This relaxes Apache security settings.
      AllowOverride all
      # MultiViews must be turned off.
      Options -MultiViews
      # Uncomment this if you're on Apache >= 2.4:
      Require all granted
   </Directory>
</VirtualHost>

error_log:

[Sun Feb 22 09:49:20 2015] [error] [client 192.168.33.1] (13)Permission denied: access to / denied
[Sun Feb 22 09:49:20 2015] [error] [client 192.168.33.1] (13)Permission denied: access to /favicon.ico denied
takuma
  • 17
  • 6

1 Answers1

0

The user that execute passenger and the web server doesn't have access to

/home/vagrant/shitatta/public

You should in my opinion make some changes:

  • Login with your user (vagrant)
  • Create a directory /opt/web/
  • Copy your project in /opt/web/shitatta
  • Go to /opt/web
  • Change auth access like : chmod 755 shitatta/*
  • Change owner : chown -R vagrant:vagrant shitatta
  • Change your apache conf with new paths
  • Add your user to www-data adduser vagrant www-data or any other user that will use Apache

If you have a permission denied when you run command, add sudo before each command. In my opinion it's a mistake to store your website in your home folder.

You should read about rails :

Community
  • 1
  • 1
Ludovic
  • 1,992
  • 1
  • 21
  • 44