Configuring Apache on Fedora 12
Added by Arne De Herdt over 14 years ago
Hello,
I'm rather new to this entire Linux business and redmine, but we're trying to setup a server running the RedMine application.
Our Linux server is a Fedora12 system, so I've tried to follow the guide on the redmine website as good as possible.
I've installed Apache, mysql, ruby and rails. Installed all the missing/required gems and downloaded the RedMine from the SVN.
I've placed the entire redmine "software" in /opt/redmine and made all the configurations required by the website.
Ruby version 1.8.6 (x86_64-linux)
Rubygems version 1.3.6
Rails version 2.1.2
Active Record version 2.1.2
Action Pack Version 2.1.2
Active Resouce version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Application root /opt/redmine
Environment production
Database adapter mysql
I've added the VirtualHost directory to my apache conf file as stated by the website, but when I browse to the ip of the server with my browser I get the files like I was browsing an FTP directory. The Rails application is not running in apache. It works fine when I use the wbebrick or mongrel testrun on port 3000.
Here's the entry for redmine in my httpd.conf file:
<VirtualHost *:80>
ServerName redmine.kitty.com
ServerAdmin webmaster@redmine.kitty.com
DocumentRoot /opt/redmine/public
ErrorLog logs/redmine_error_log
AddHandler cgi-script .cgi
<Directory "/opt/redmine/public/">
Options Indexes ExecCGI FollowSymlinks
Order allow,deny
Allow from all
AllowOverride all
RailsEnv production
</Directory>
</VirtualHost>
I've also taken a peek at the entries of the error log when I accessed the site:
[error] [client 19.168.44.1] Directory index forbidden by Options directive: /opt/redmine/public
So I'm a bit clueless on what to do now...
Replies (8)
RE: Configuring Apache on Fedora 12
-
Added by Felix Schäfer over 14 years ago
Your rails is too old for current Redmine (I think 0.9 needs 2.3.5).
Also: what are you trying to use to server redmine? From what I see, you're using cgi, I'd recommend mod_passenger if that is an option for you.
RE: Configuring Apache on Fedora 12
-
Added by Arne De Herdt over 14 years ago
I believe that I have passenger installed. I downloaded the gem with ruby and followed the steps from the guide to install this.
I've also added the entry in the config file to load the module.
But about the rails, if I do not have 2.1.2 installed, the rake commands complain about it.
RE: Configuring Apache on Fedora 12
-
Added by Felix Schäfer over 14 years ago
What version of redmine have you installed? Or from what svn branch and revision?
RE: Configuring Apache on Fedora 12
-
Added by Arne De Herdt over 14 years ago
I've just removed everything and downloaded the version 0.9 as you mentioned from the installation guide.
I've reconfigured everything according the guide, recreated the database and all.
All rake commands worked without a problem, so my database is populated. Ran the tests with the webrick server and that all seemed to work as well.
Now I've configured apache and when I try to visit the site again I recieve the error message that the rails application failed to start properly. (At least this is a step further :))
When I take a look at the error log I recieved the following two errors:
[error][client 192.168.44.1] (13)Permission denied: exec of '/opt/redmine/dispatch.cgi' failed
[error][client 192.168.44.1] Premature end of script headers: dispatch.cgi
I've tried running the command public/dispatcher.cgi as mentioned in the installation guide and this is what I recieve as output:
public/dispatch.cgi
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependecy#version_requirements is deprecated and will be removed on or after august 2010. Use #requirement
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/dispatcher.rb:24: warning: already initialized constant Dispatcher
/usr/lib/ruby/gems/1.8/gems/actionpack-2.35/lib/action_controller/cgi_process.rb:22: in '__send__': undefined method 'env_table' for nul:NulClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/cgi_process.rb:22:in 'dispatch_cgi'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:101:in 'dispatch_cgi'
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:27:in 'dispatch'
from public/dispatch.cgi:11
I hope this information helps. If I need to fetch something or give more information I'm happy to. I really wish to get redmine running and start using it here at work instead of the tools we have right now.
RE: Configuring Apache on Fedora 12
-
Added by Felix Schäfer over 14 years ago
Ok, if you want to use passenger, just remove the .htaccess file, as that is needed only for cgi operations (passenger is not cgi :-) ). Reload apache after that and try it again.
RE: Configuring Apache on Fedora 12
-
Added by Arne De Herdt over 14 years ago
Done, but now I get all the files again as before and not the redmine application (see attached screenshot)
Also, it seems I have a problem with passenger. I've looked into the error-log from apache itself and found the following entries:
[notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[error] *** Passenger could not be initialized base of this error: Cannot create FIFO file /tmp/passenger.2171/.guard: Permission denied(13)
[notice] Digest: generating secret for digest authentication...
[notice] Digest: done
[error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.2171/.guard: Permission denied(13)
[notice] Apache/2.2.14 (Unix) DAV/2 Phusion_Passenger/2.2.11 SVN/1.6.9 configured -- resuming normal operations
I'm not experienced in Linux, but something tells me that is the root of the problem ?
overview.jpg (194 KB) overview.jpg |
RE: Configuring Apache on Fedora 12
-
Added by Felix Schäfer over 14 years ago
It is. See http://www.modrails.com/documentation/Users%20guide.html#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it and/or google for mentions of installing passenger on fedora12.
RE: Configuring Apache on Fedora 12
-
Added by Arne De Herdt over 14 years ago
I will take a look it later and see if I can find a compromise somewhere.
For now I have put SELinux into permissive mode and the application is working fine without a problem.