Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Installation  >  Linux  >  Thread
   
 
Trouble installing publicly-accessible w/ apache (debian stable)
 
Idan Gazit
Posted: 24 August 2006 09:06 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  1
Joined  2006-08-24

Hey everybody,

So basically I have successfully gotten to the point that running tracs on webrick works. That is, I run it a la “ruby script/server -e production” and I’m able to login using a local browser; I’ve successfully done the “signup” bit, etc.

However, I am simply incapable of divining what arcane rites are necessary to get this to work on apache and not webrick.

My apache setup has it as a subdirectory of the website, i.e. https://mydomain.com/tracks, and the config for that directory requires authentication, so I can access it from anywhere. Using fastcgid.

When I try to access https://mydomain.com/tracks, I get “Rails application failed to start properly”, and the following in development.log:

Processing Base#index (for 62.219.193.109 at 2006-08-24 05:01:50) [GET]
  
Session ID: 86b3fd87ba1b04047f2498926184d191
  Parameters
: {}


SystemExit 
(exit):
    /
vendor/rails/railties/lib/fcgi_handler.rb:126:in `exit'
    /vendor/rails/railties/lib/fcgi_handler.rb:126:in 
`exit_now_handler'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `to_proc'
    
/vendor/rails/railties/lib/fcgi_handler.rb:114:in `call'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:213:in 
`continue'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:85:in `write_generation'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:85:in `add_segment'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:85:in 
`write_generation'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:207:in `go'
    
/vendor/rails/actionpack/lib/action_controller/code_generation.rb:216:in `continue'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:85:in 
`write_generation'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:85:in `add_segment'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:85:in `write_generation'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:207:in 
`go'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:363:in `write_generation'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:363:in `method_missing'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in 
`indent'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in `method_missing'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:363:in `write_generation'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:562:in 
`generation_code_for'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:560:in `method_missing'
    
/vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in `indent'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in 
`method_missing'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:560:in `generation_code_for'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:554:in `indent'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:554:in 
`generation_code_for'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:551:in `each_with_index'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:551:in `each'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:551:in 
`each_with_index'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:551:in `generation_code_for'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:546:in `method_missing'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in 
`indent'
    /vendor/rails/actionpack/lib/action_controller/code_generation.rb:46:in `method_missing'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:546:in `generation_code_for'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:489:in 
`write_generation'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:483:in `each'
    
/vendor/rails/actionpack/lib/action_controller/routing.rb:483:in `write_generation'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:630:in 
`draw'
    /config/routes.rb:1
    /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:129:in `load'
    
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:129:in `load'
    /vendor/rails/actionpack/lib/action_controller/routing.rb:608:in 
`reload'
    /vendor/rails/railties/lib/dispatcher.rb:67:in `prepare_application'
    
/vendor/rails/railties/lib/dispatcher.rb:37:in `dispatch'
    /vendor/rails/railties/lib/fcgi_handler.rb:150:in 
`process_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
    
/vendor/rails/railties/lib/fcgi_handler.rb:53:in `each_cgi'
    /usr/lib/ruby/1.8/fcgi.rb:597:in 
`each'
    /usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
    
/vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:23:in 
`process!
    /var/
web/tracks/public/dispatch.fcgi:24

Rendering 
/var/web/tracks/public/../config/../vendor/rails/actionpack/lib/action_controller/templates/rescues/
layout.rhtml (500 Internal Error) 

What gives? I am a little stumped…. I am happy to post more information on my configuration if somebody can tell me what might be relevant.

Thanks!

-Idan

Profile
 
Zteven
Posted: 26 August 2006 08:52 AM   [ Ignore ]   [ # 1 ]  
Newbie
Rank
Total Posts:  3
Joined  2006-08-26
Idan Gazit - 24 August 2006 09:06 AM

So basically I have successfully gotten to the point that running tracs on webrick works. That is, I run it a la “ruby script/server -e production” and I’m able to login using a local browser; I’ve successfully done the “signup” bit, etc.

However, I am simply incapable of divining what arcane rites are necessary to get this to work on apache and not webrick.

Just to check: are you really installing on apache or apache2? I got it succesfully working with apache2 with fcgid.

Can you make it work with normal cgi? Do you use rewrite rules? What apache modules do you have running?

My public/.htaccess consists of the following:

AddHandler fcgid-script .fcgi
Options 
+FollowSymLinks +ExecCGI


RewriteEngine On

RewriteBase 
/tracks

RewriteRule 
^$ index.html [QSA]
RewriteRule 
^([^.]+)$ $1.html [QSA]
RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteRule 
^(.*)$ dispatch.fcgi [QSA,L] 

My /etc/apache2/apache2.conf contains:

AddHandler fcgi-script .fcgi
Alias 
/tracks /usr/src/tracks-1.042/public

<
Directory /usr/src/tracks-1.042/public>
  
Options ExecCGI FollowSymlinks
  AllowOverride All
</Directory> 

I log in with “http://lampje/tracks” (the machine hosting tracks is called lampje).

Bye,
Steven

Profile
 
bsag
Posted: 27 August 2006 10:33 AM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  217
Joined  2006-03-05

Idan: Zteven’s .htaccess is probably worth trying if you’re still having problems. That said, getting FCGI working with Apache is a bit of an ordeal, and running under CGI is very slow. Since this is your own machine, I would strongly advise getting lighttpd installed (particularly if you’re not running Apache for anything else. It’s light, fast, and very easy to configure (in fact, once you’ve got it installed, running script/server will run lighttpd automatically and install a lighttpd.conf in the config directory, which you can then edit as you wish.

There’s a package for Debian unstable, or you can install from source.

Profile
 
c00i90wn
Posted: 29 December 2006 05:32 PM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  4
Joined  2006-12-29

Perhaps you should take a look at: http://www.rousette.org.uk/projects/forums/viewthread/104/ explains how to do it with fastcgi apache and mysql smile

Profile
 
Stephen_B
Posted: 07 January 2007 11:13 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  4
Joined  2006-11-01

Steven, thanks!

The missing piece was making the addition to apache2.conf. I don’t understand why this is not documented on the rails site ...

Stephen

Profile
 
   
 
 
‹‹ Problem running Tracks 1.041 on Open Suse 10.1      mySQL Schema Installation Problems ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1108 seconds

Atom Feed
RSS 2.0