Redmine with Apache 2 + Passenger nightmare --- site is up and available, but Redmine doesn't execute
Posted
by
CptSupermrkt
on Server Fault
See other posts from Server Fault
or by CptSupermrkt
Published on 2013-11-04T01:35:40Z
Indexed on
2013/11/04
3:56 UTC
Read the original article
Hit count: 630
I was determined to figure this out myself, but I've been at it for a total of more than 10 hours, and I just can't figure this out. First, let me detail my environment (which I cannot change):
- Server version: Apache/2.2.15 (Unix)
- Ruby version: ruby 1.9.3p448
- Rails version: Rails 4.0.1
- Passenger version: Phusion Passenger version 4.0.5
- Redmine version: 2.3.3
I have followed the Redmine instructions all the way through the test webserver to check that installation was successful with this command: ruby script/rails server webrick -e production
The roadblock which I cannot overcome is getting Apache and Passenger to interpret and properly serve Redmine. I have searched pretty much every possible link within the first 10 pages or so of Google results. Everywhere I go I come across conflicting/contradicting/outdated information.
We have a "weird" setup with Apache (which I inherited and cannot change). Redmine needs to be served through SSL, but Apache already has another website it's serving through SSL called Twiki. By "weird", what I mean is that our file structure is entirely different from all the tutorials out there on this version of Apache which have directories like "available-sites" and such.
Here are the abbreviated versions of some of our config files:
/etc/httpd/conf/httpd.conf (the global configuration file --- note that NO VirtualHost is defined here):
ServerRoot "/etc/httpd"
...
LoadModule passenger_module /usr/local/pkg/ruby/1.9.3-p448/lib/ruby/gems/1.9.1/gems/passenger-4.0.5/libout/apache2/mod_passenger.so
PassengerRoot /usr/local/pkg/ruby/1.9.3-p448/lib/ruby/gems/1.9.1/gems/passenger-4.0.5
PassengerDefaultRuby /usr/local/pkg/ruby/1.9.3-p448/bin/ruby
Include conf.d/*.conf
...
User apache
Group apache
...
DocumentRoot "/var/www/html"
So just to clarify, the above httpd.conf file does NOT have a VirtualHost section.
/etc/httpd/conf.d/ssl.conf (defines the VirtualHost for ssl):
Listen 443
<VirtualHost _default_:443>
SSLEngine on
...
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
</VirtualHost>
/etc/httpd/conf.d/twiki.conf (this works just fine --- note this does NOT define a VirtualHost):
ScriptAlias /twiki/bin/ "/var/www/twiki/bin/"
Alias /twiki/ "/var/www/twiki/"
<Directory "/var/www/twiki/bin">
AllowOverride None
Order Deny,Allow
Deny from all
AuthType Basic
AuthName "our team"
AuthBasicProvider ldap
...a lot of ldap and authorization stuff
Options ExecCGI FollowSymLinks
SetHandler cgi-script
</Directory>
/etc/httpd/conf.d/redmine.conf:
Alias /redmine/ "/var/www/redmine/public/"
<Directory "/var/www/redmine/public">
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
</Directory>
The amazing thing is that this doesn't completely NOT work: I can successfully open up https://someserver/redmine/
with SSL and the https://someserver/twiki/
site remains unaffected. This tells me that it IS possible to have two separate sites up with one SSL configuration, so I don't think that's the problem.
The problem is is that it opens up to the file index. I can navigate around my Redmine file structure, but no code ever gets executed. For example, there is a file included with Redmine called dispatch.fcgi in the public folder. https://someserver/redmine/dispatch.fcgi
opens, but just as plain text code in the browser. As I understand it, in the case of using Passenger, CGI and FastCGI stuff is irrelevant/unused.
© Server Fault or respective owner