403 denied access with rails / apache / passenger

I have apache installed on debian squeeze. I installed ruby ​​1.9.3 on rvm and rails + to the passenger through 'gem install'. My setup is the rails application in '/ var / rails / rails_app' and I configured the subdomain "rails-app.mydomain.com", which redirects to this application folder, which is chmodded 755 with www-data: www-data.

I watched the installation of Ruby On Rails on this site β†’ http://xyzpub.com/en/ruby-on-rails/3.2/rails3-install-debian.html and the passenger is one with the subdomain setup on this β†’ http: // www .asconix.com / howtos / debian / multiple-ruby-rails-apache-passenger-rvm-debian-howto

Now, when I enter my site through this subdomain, it shows the error "403 denied access"! Before I deleted it, he discovered Ruby On Rails "Welcome Abroad" -Message.

When I launch Passenger Standalone in the dir application via the β€œpassenger start”, the application works as it should on port 3000.

Can you tell me what the problem is?

The apache error log shows me this [Sat Nov 10 07:38:09 2012] [error] [client XXX.XXX.XXX.XXX] the client refused the server configuration: / var / rails / rails_app / public /

+4
source share
1 answer

I think you are trying to access your application via http on port 80. And you did not configure apache on your application using message 80.

First of all, check if the passenger modem is installed on your server. Secondly, make sure that your Apache configuration was something like

<VirtualHost *:80> ServerName <server name> # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot <path to public folder of your application> RailsEnv production <Directory <path to public folder of your application> > # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options FollowSymLinks </Directory </VirtualHost> 
0
source

Source: https://habr.com/ru/post/1445189/


All Articles