Adam,
I am not sure that you need the fcgi stuff in you vhost with passenger. mine runs on ubuntu so it should be about the same. i don't run fcgi. It might be nothing, but I could see the potential for conflict...
If you didn't you need to run (as root i think):

gem install passenger
passenger-install-apache2-module

It might even give you a suggested vhost at the end of the module install.


On 03/08/2012 03:22 PM, Adam Carter wrote:
Hi All,

I am having a problem installing Tracks on Debian with Apache. I can get the login screen for Tracks, but when entering the login details it returns a 500 error. I tried deliberately entering the wrong username for the MySQL config in database.yml and the error is the same, so I don't think it is even connecting to MySQL yet.

Here is my apache2.conf file (I have tried many versions based on reading similar problems):

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11
   PassengerRuby /usr/bin/ruby1.8
  PassengerUserSwitching off
  PassengerDefaultUser www-data
  RailsEnv production

my vhost config:

<VirtualHost *:80>
    ServerAdmin webmas...@domain.com
    DocumentRoot "/var/www/domain.com/tracks/public"
    ServerName tracks.domain.com
    ErrorLog  ${APACHE_LOG_DIR}/tracks.domain.com-error_log.log
CustomLog ${APACHE_LOG_DIR}/tracks.domain.com-access_log.log combined

    AddHandler fcgid-script .fcgi
    DefaultInitEnv RAILS_ENV production

<Files *.fcgi>
            SetHandler fcgid-script
            Options ExecCGI +FollowSymLinks
</Files>

<Directory /var/www/domain.com/tracks/public>
            RewriteEngine on
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^/(.*) dispatch.fcgi [QSA,L]

        Allow from all
        Options -MultiViews
</Directory>
</VirtualHost>


Production log file:


Processing LoginController#login (for 10.0.50.x at 2012-03-08 21:11:24) [GET]
  Parameters: {"action"=>"login", "controller"=>"login"}
Rendering template within layouts/login
Rendering login/login
Completed in 126ms (View: 82, DB: 51) | 200 OK [http://tracks.domain.com/login]


Processing LoginController#login (for 10.0.50.x at 2012-03-08 21:11:29) [POST] Parameters: {"user_login"=>"user", "action"=>"login", "authenticity_token"=>"xxxxxxxxxxxxxxxxx", "controller"=>"login", "user_password"=>"[FILTERED]", "user_noexpiry"=>"on", "login"=>"Sign in »"}

BCrypt::Errors::InvalidHash (invalid hash):
vendor/cache/ruby/1.8/gems/bcrypt-ruby-2.1.4/lib/bcrypt.rb:165:in `initialize'
  app/models/user.rb:224:in `new'
  app/models/user.rb:224:in `password_matches?'
  app/models/user.rb:128:in `authenticate'
  app/controllers/login_controller.rb:40:in `login'
vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:1333:in `send' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:1333:in `perform_action_without_filters' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:617:in `call_filters' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/rescue.rb:160:in `perform_action_without_flash' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/flash.rb:151:in `perform_action' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:532:in `send' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:532:in `process_without_filters' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/filters.rb:606:in `process' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:391:in `process' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/base.rb:386:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/routing/route_set.rb:438:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:87:in `dispatch' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:121:in `_call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/string_coercion.rb:25:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/params_parser.rb:15:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/session/abstract_store.rb:177:in `call' vendor/cache/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:29:in `call' vendor/cache/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' vendor/cache/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:9:in `cache' vendor/cache/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/query_cache.rb:28:in `call' vendor/cache/ruby/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/failsafe.rb:26:in `call' vendor/cache/ruby/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:106:in `call' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:479:in `safe_fork' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:180:in `start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99

Rendering /var/www/domain.com/tracks/public/500.html (500 Internal Server Error)


It looks like it might be an issue with the passenger-spawn-server.

This is the first time I have installed a Ruby on Rails application, so there is a very high chance there is something wrong with my install, but I would appreciate a kind pointer in the right direction please!

Thanks
_______________________________________________
Tracks-discuss mailing list
Tracks-discuss@lists.rousette.org.uk
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss
_______________________________________________
Tracks-discuss mailing list
Tracks-discuss@lists.rousette.org.uk
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss

Reply via email to