2

I'm trying to run Phusion Passenger with Apache and when I start passenger I get the following error:

=============== Phusion Passenger Standalone web server started ===============
PID file: /root/passenger.3000.pid
Log file: /root/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
===============================================================================
    2012/12/11 18:01:36 [error] 3188#0: *4 "/root/public/index.html" is forbidden (1
3: Permission denied), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"

I've had a look around at other peoples comments on this but their answers are focused around Nginx rather than Apache. Any advice would be appreciated.

codebytom
  • 418
  • 4
  • 12
  • permissions on /root/public/index.html ? – wkhatch Dec 11 '12 at 18:30
  • it's trying to access index.html but the file does not exist in the public directory. – codebytom Dec 12 '12 at 08:54
  • well that would certainly explain it ;-) You can define a route for root, in your routes.rb so that it won't try to hit the default index.html. It would look something like this: root :to => "welcome#index" – wkhatch Dec 12 '12 at 17:40
  • 1
    Where is your application root? Is it supposed to be /root? – Hongli Mar 16 '13 at 19:23

1 Answers1

0

Phusion Passenger Standalone will refuse to run as root for security reasons. When you ran passenger start, it asked you to provide --user, didn't it? Well, Phusion Passenger Standalone is running as that user, and that user probably does not have permission to access anything under /root.

You can either relax permissions on /root, or you can move your application directory to a place where it's accessible for that user.

Hongli
  • 18,682
  • 15
  • 79
  • 107