1

I and some others are setting up Redmine on a Debian server running Apache. Actually, I didn't do the initial setup but I can't get ahold of the guy who did right now so I'm asking here.

We are using Phusion Passenger to serve Ruby content (I guess, I'm very inexperienced with Apache) and Redmine shows up fine, but none of the static content (css, images, js) show up, and when I try to go to myurl/redmine/images or /stylesheets, I get a 404 page which I think originates from Phusion Passenger. This seems like it should be something obvious, but I can't figure out what's wrong. There was a .htaccess file in the public directory which I renamed because someone on another site had mentioned that the .htaccess file causes problems with Phusion Passenger, but even after restarting Apache I still can't see images or stylesheets.

This server is also running our main site, written in Django and running on mod_python, as well as some PHP stuff and some other Python but non-Django stuff. The relevant section of httpd.conf is as follows:

<Location "/redmine">
    PassengerEnabled on
    SetHandler none
    PassengerAppRoot /var/www/redmine/
    RailsBaseURI    /redmine
</Location>

2 Answers 2

2

You probably need to alias /redmine to /var/www/redmine/public, or perhaps a file-exists-conditioned local rewrite. I'm sure Google is full of "how to setup a Rails app with Passenger" guides, though, and they'll probably have more appropriate info.

3
  • Well, most of the stuff I've found assumes that you're only running redmine on your server, which is a stupid assumption. I'll try that though.
    – Ibrahim
    Aug 21, 2009 at 1:15
  • Actually, I guess manually adding aliases for each of the static directories worked. It seems hackish though, but working is better than nothing.
    – Ibrahim
    Aug 21, 2009 at 4:04
  • you're absolutely right - install your redmine app outside the DocumentRoot, and add a symlink to the redmine public directory from inside Apache. Its a common issue - Apache serves html/mod_xyz pages inside the document root, and cannot figure out whether it should use one module or another. Passenger doesn't work as transparently as mod_php for example, so you have to split the 2 areas apart.
    – gbjbaanb
    May 28, 2010 at 23:14
0

You have to specify the /public folder inside Redmine as DocumentRoot. The following configuration works fine inside a VirtualHost directive.

ServerName redmine.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/redmine/public

For details see: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_ruby_on_rails_application

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .