Project

General

Profile

Just installed Redmine - only thing showing is a index of the directory - what is wrong?

Added by David Brandt about 11 years ago

Hi

I'm brand new to Redmine, and ruby - good starting point!

My webserver is running debian linux, and I used this guide: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_using_Debian_package
It seems that the database has been made and a user also. The apache server is also setup to point at redmines public folder, but the only thing showind when I try to access redmine from the browser is a index of the files - see the attached image.

Any idea what has gone wrong?


Replies (18)

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Your application server (= phusion passenger) isn't running or isn't correctly configured.
Although I like debian very much, the redmine packages are quite old. I wrote a guide on how to install a recent stack (ruby, rails, passenger), perhaps you can try that?

Or, if you want to stick with the old 1.4.4, post your apache config file(s)...

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Thanks!

I will try to follow the guide you posted!
It would also be nice to use a newer version of redmine!

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

David Brandt wrote:

It would also be nice to use a newer version of redmine!

Indeed, using a recent versions of ruby, rails and redmine is certainly a good idea.

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Hi Jan Niggemann

I tried to follow the guide you suggested, and despite some problems I think that ruby is up running.

ruby -v shows: ruby 1.9.2p0
rails -v shows: Rails 3.2.11
gem -v shows: 1.8.23

I know it's not ruby 1.9.3, but this version should work with redmine as far as I can see.

Installing redmine worked out fine, but I cannot seem to verify it with the tutorials step 2.8:

ruby script/rails server webrick -e production just outputs: -bash: syntax error near unexpected token `newline' My apache server is setup to a virtual host that directs to /var/www/redmine that is a link to /opt/redmine/public/ but when I try to access it from the browser I only get a "404 not found - The requested URL /index.html was not found on this server." Maybe the .htaccess file has to be modified - but I would like to be sure that ruby is running on the apache server correctly. Any idea where I can start :(

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

I just corrected an error with a superflous bracket. Retry: Make sure you're root, go to /opt/redmine and type

ruby script/rails server webrick -e production

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Hi Jan

Thanks for the quick reply!

This outputs a lot that I can't seem to post here. Maybe the attached file shows the output!

output.txt (5.31 KB) output.txt The output

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

production database is not configured

What's in your database.yml (step 2.4?)

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

--- database.yml ---

production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: XXX


But I think I made a error in step 2.5 and 2.6!

I changed directory to "/opt/redmine/ and executed "rake generate_secret_token" which worked.
But when i execute "RAILS_ENV=production rake db:migrate" i get "rake aborted!" and a lot about production database is not configured!

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Just checked the redmine database, and it contains no tables!

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

You probably forgot to create the database-user and / or grant the permissions (step 2.3).
What does mysql say if you SELECT Host, User FROM mysql.user WHERE user='redmine'; and show grants for redmine@localhost;?

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Agree, that seems OK... Do you have the line 127.0.0.1 localhost in your /etc/hosts? Perhaps something like #11658? What exactly is the output of RAILS_ENV=production rake --trace db:migrate?

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

/etc/hosts seems fine - contains the line "127.0.0.1 localhost"

I've attached the output from "RAILS_ENV=production rake --trace db:migrate"

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

OK, perhaps due to my guide, just to make sure: your database.yml is properly indented is it?
In YAML, whitespace does matter... Try to indent adapter, database, host, username and password by 2 spaces:

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: XXX

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Hi Jan

That did it :)
The 2 spaces was missing from the "database.yml". Now I've been able to run "RAILS_ENV=production rake db:migrate" and the database tables got created.

I'm also able to log into redmine from the "ip-adress:3000" but I can't seem to get my apache virtualhost to find Redmine. I just get an index of the directory.
If I rename the "dispatch.fcgi.example" to "dispatch.fcgi" and "htaccess.fcgi.example" to ".htaccess" I get a "404 Not Found - The requested URL /index.html was not found on this server".

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Good to hear, so up to 2.8 of my guide everything works.
If you want to use a virtual server instead of using a subURI, put this in /etc/apache2/sites-available/redmine

<VirtualHost *:80>
  ServerName xxx
  DocumentRoot /opt/redmine-dev/public
  RailsBaseURI /
  RailsEnv production
  LogLevel info
  ErrorLog /var/log/apache2/test-error.log
  CustomLog /var/log/apache2/test-access.log combined

  <Directory "/opt/redmine-dev/public">
    Options -MultiViews
  </Directory>
</VirtualHost>

You then have to enable the new config with a2ensite redmine, followed by apachectl graceful

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by David Brandt about 11 years ago

Dear Jan

Thank you for all your help!

Our Redmine is now up running - and it's beautiful :)

Your last post with the virtual host settings worked, but redmine wouldn't run. With help we figured out that two ruby servers was running at our server, which gave us some problems. The start of your guide where you describe installing ruby 1.9.3 you might consider using "make && make checkinstall" instead. In this way you install ruby as a debian package and is able to uninstall it without problems. Just a suggestion!

Thank you again!

RE: Just installed Redmine - only thing showing is a index of the directory - what is wrong? - Added by Jan Niggemann (redmine.org team member) about 11 years ago

David Brandt wrote:

Thank you for all your help!

You're welcome!

The start of your guide where you describe installing ruby 1.9.3 you might consider using "make && make checkinstall" instead. In this way you install ruby as a debian package and is able to uninstall it without problems. Just a suggestion!

And a good one indeed, I changed the guide accordingly, thanks for pointing it out.

    (1-18/18)