Phusion Passanger, Apache 2, mysql and Linux
Ok here is the deal.
I've got a Linux jbw server, and it's running Apache2. I've installed Phusion Passanger o开发者_运维技巧n top of that, and when I restart Apache2 I can see it points to the default RoR website. When I click "about this server", I get the following error.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.9 (Debian) Phusion_Passenger/3.0.0 PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_perl/2.0.4 Perl/v5.10.0 Server at www.(my website name).com Port 80
I have no idea about Phusion and the documentation isn't too helpful - where to I start to even begin debugging this?
Also I can't get gem to work, seems Phusion doesn't default install ruby gem - if that is the case how do I install other gems for an application??
May I feel soooo lost! Is there a good website that can take me step by step? The Phusion default installation website assumes a whole lot of stuff!
B
You'll need to install RoR in the gemset that Passenger uses (e.g. if you're using passenger with Ruby Enterprise Edition, you'll need to use REE's gem command to install it. Typically for a production deploy that's the only Ruby I use on the system.) Once you've got that installed if you continue to run into problems, the place to look is in the app's logs folder at the production.log file (assuming its a production environment.)
If you open the Phusion Passenger documentation and go to the "Troubleshooting -> Problems after installation" section then the first thing you see is the Golden Tip:
The golden tip: read your Apache error logs!
mod_passenger will write all errors to the Apache error log. So if you’re experiencing post-installation problems, please look inside the Apache error logs. It will tell you what exactly went wrong.
That's what I would normally tell people. But in your specific case the 'About' link isn't supposed to work: it only works when your app is running in the development environment, and is disabled for security reasons in the production environment. Phusion Passenger is designed for production environments and thus defaults RAILS_ENV to 'production'.
I'm looking for useful feedback on improving the documentation. You said you feel lost. Where in the documentation did you expect help? What was the first place you looked in when you experienced trouble?
Any apache errors should be in the error log, usually somewhere like /var/log/apache/error.log.
It looks like you didn't compile the passenger gem properly. These should be the steps:
sudo gem install passenger
sudo passenger-install-apache2-module
And read the output of passenger carefully. They contain all the information you need, including how to install missing dependencies and which lines to add to your configuration.
If you wish to experiment with different Ruby versions, check out RVM: http://rvm.beginrescueend.com/
精彩评论