Setting up Redmine on Debian with Phusion Passenger, static content doesn't show up

5,030

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.

Share:
5,030

Related videos on Youtube

Ibrahim
Author by

Ibrahim

Updated on September 17, 2022

Comments

  • Ibrahim
    Ibrahim over 1 year

    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>
    
  • Ibrahim
    Ibrahim over 14 years
    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
    Ibrahim over 14 years
    Actually, I guess manually adding aliases for each of the static directories worked. It seems hackish though, but working is better than nothing.
  • Decebal
    Decebal almost 14 years
    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.