Redmine on Debian/Apache/Passenger in sub directory only shows directory index
Added by andy p almost 14 years ago
hi,
i'm new to ror/redmine. my aim is to install redmine to run in a sub directory served by apache on port 80 next to my php apps which run in another subdirectory.
i installed ruby, rubygems, rails, redmine w/mysql and more. the redmine installation came with a wizzard to collect some data like db credentials and to create a db user and a redmine db.
my problem is that when i open the browser, all i get is the index of /redmine:
.. 404.html 500.html dispatch.cgi dispatch.fcgi dispatch.rb dispatch.rb.example favicon.ico help/ images/ javascripts/ stylesheets/ themes/
since i'm a newbe i'm left with guessing: to me it looks like passenger is not kicking in to start/parse the redmine code.
phpinfo confirms mod_passenger is being loaded. i followed the http://modrails.com/install.html and http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri and i stumbled across http://www.redmine.org/boards/2/topics/15491
- redmine resides in /usr/share/redmine
- web root is /var/www
- soft link /var/www/redmine -> /usr/share/redmine/public/
my /etc/apache2/sites-enabled/000-default:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> PassengerAppRoot /var/www/redmine RailsBaseURI /redmine <Directory /var/www/redmine> AllowOverride All Options -MultiViews +FollowSymLinks +SymLinksIfOwnerMatch </Directory> </VirtualHost>
Replies (6)
RE: Redmine on Debian/Apache/Passenger in sub directory only shows directory index - Added by Etienne Massip almost 14 years ago
Did you take a look at these HowTo's :
HowTo Install Redmine in a sub-URI
HowTo Install Redmine in a sub-URI on Windows with Apache
RE: Redmine on Debian/Apache/Passenger in sub directory only shows directory index - Added by andy p almost 14 years ago
yeah, i had a look. i didn't quite know where to put the additional lines from the first link so i put it at the end of the environment.rb:
Redmine::Utils::relative_url_root = "/redmine" ActionController::AbstractRequest.relative_url_root = "/redmine" ActionController::Base.relative_url_root = "/redmine"
didn't help...
also the article talks about "restarting". how does that work, just restart apache or can a ruby app be "started"? cause i'm not sure if i've started anything yet. sorry for asking silly questions but i'm from the php world.
one other thing: the whole redmine code is owned by the www-data. is that correct?
and one more thing: am i right in thinking that i have a passenger problem right now and that i get an error if my config or installation is erroneous instead of the directory list?
RE: Redmine on Debian/Apache/Passenger in sub directory only shows directory index - Added by andy p almost 14 years ago
ok, i checked the error.log:
[Tue Mar 22 00:26:07 2011] [error] *** Passenger could not be initialized because of this error: The Passenger spawn server script, '/var/lib/gems/1.8/gems/passenger-3.0.5/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly.
in /etc/apache2/mods-enabled/passenger.conf i have:
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.5 PassengerRuby /usr/bin/rubybut there is no passenger-spawn-server in /var/lib/gems/1.8/gems/passenger-3.0.5/lib/phusion_passenger/ but in
- /usr/lib/phusion_passenger/passenger-spawn-server
- /var/lib/gems/1.8/gems/passenger-3.0.5/helper-scripts/passenger-spawn-server
copy one of them over (tried both) passenger complains about a missing ApplicationPoolServerExecutable which is indeed not there but in /usr/lib/phusion_passenger. copying this one too finally brings up apache without the error. but when i access my redmine url i get a 500 (The spawn server has exited unexpectedly.)
any clues??
passenger-spawn-server missing - Added by andy p almost 14 years ago
Ruby version 1.8.7 (i486-linux) RubyGems version 1.3.7 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /usr/share/redmine-1.1 Environment production Database adapter mysql Database schema version 20101114115359
RE: Redmine on Debian/Apache/Passenger in sub directory only shows directory index - Added by andy p almost 14 years ago
nobody any clue? cmon just throw in some ideas?
is it normal that passenger spins up passenger-spawn-server?
can i somehow run redmine without it?
where is it supposed to live? /var/lib/gems/1.8/gems/passenger-3.0.5/lib/phusion_passenger/ or /var/lib/gems/1.8/gems/passenger-3.0.5/helper-scripts/passenger-spawn-server
do i have to copy it? do i have to aktivate/configure something?
do i have the wrong version of any component?
pleeeeze...
RE: Redmine on Debian/Apache/Passenger in sub directory only shows directory index - Added by andy p almost 14 years ago
ok, i got one step further: i had two installations of passenger on my server and i loaded the wrong one :-/