Project

General

Profile

redmine-1.1 stable on os x server 10.6.7

Added by Michael Rogers almost 13 years ago

I've been banging my head against this for a couple of days now: HOW ON EARTH DO YOU GET THE APACHE VIRTUAL HOSTS TO WORK CORRECTLY WITH RAILS?

I installed redmine 1.1 stable on an os x server (10.6.7) as per the instructions at http://www.redmine.org/projects/redmine/wiki/RedmineInstallOSXServer, since this version works with the default ruby install on os x server, which happens to match the rails and rack versions in the install instructions.

From there, I can see the site using webrick on http://myserver.edu:3000, and I can see it on port 800[0-2] if I use mongrel_cluster with ($ sudo -u _www mongrel_rails cluster::configure -e production -p 8000 -N 3), as per this post: (http://www.redmine.org/boards/2/topics/17148).

However, I don't get any graphics with either of these (just a white screen with some links along the left side instead of the nice blue/white redmine look). I also tried doing something with Proxies in apache as per this post: http://www.redmine.org/boards/2/topics/24043 (it's this bit):

ProxyPreserveHost Off
ProxyPass        /redmine  http://127.0.0.1:3000/
ProxypassReverse /redmine  http://127.0.0.1:3000/

with the port changed to reflect using mongrel.

This gets me the nice redmine start page complete w/ blue and white graphics, but all the links try to link to http://myserver.edu/redmine-1.1/public etcetera, and I get the 403 (access forbidden) error. I know I can get this dir from the web because if I put a simple index.html in there, I can browse to it from anywhere.

So, from reading around for a couple of days now and trying for a long time to get this right, I think using passenger is the best way to go about it (as the install instructions have you do). But, ++ HOW ON EARTH DO YOU GET THE APACHE VIRTUAL HOSTS TO WORK CORRECTLY ++?

Right now, I've got this in httpd.conf:

LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.7
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

<IfModule passenger_module>
        NameVirtualHost *:80
        <VirtualHost *:80>
                ServerName _default_
        </VirtualHost>
        Include /private/etc/apache2/passenger_pane_vhosts/*.conf
</IfModule>

Then in /private/etc/apache2/passenger_pane_vhosts/redmine.local.vhost.conf I've got this:
<VirtualHost *:80>
  ServerName lips.psych.umass.edu
  DocumentRoot /Library/WebServer/Documents
  RailsEnv production
  RailsBaseURI /projects
  <Directory "/Library/WebServer/Documents">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

I've got a symlink owned by _www: /Library/WebServer/Documents/projects@ -> /Library/WebServer/Documents/redmine-1.1/public
I've added this line to config/environment.rb in redmine-1.1:

config.action_controller.relative_url_root = '/projects'
as per the passenger section of the rails wiki.
But still, the dreaded 403 error. How do I even know if passenger is working? apachectl configtest is happy. I don't really know my way around apache or rails (obviously), but I think I'm not too far off - there just seems to be some information about apache and rails (and probably some os x idiosyncrasy) that I am not finding/putting together.


Replies (2)

RE: redmine-1.1 stable on os x server 10.6.7 - Added by Anonymous almost 13 years ago

try removing the symlink and just point DocumentRoot to the public directory of Redmine. Also the ServerName you set, lips.psych.umass.edu, resolves to the ip of your machine?

RE: redmine-1.1 stable on os x server 10.6.7 - Added by Michael Rogers almost 13 years ago

Pointing DocumentRoot at the public directory of redmine doesn't give me the redmine pages. That would be at least one step if that would work, but I just get the index.html I have in there, which redirects to the homepage of our lab - same as before (and that's what we want it to be actually). In the end, I want redmine to be a sub domain of our domain. That's why I'm trying to use

RailsBaseURI /projects

But it seems the whole virtualhost thing is not working at all, I can't even get redmine as the main page. So I guess step one is to get it to point somewhere different at all - just an index.html in some other directory. I could probably do that with the os x server admin GUI thing, but then I don't see how I would use it to set up a sub domain from our base url - I think you have to edit config files for that, and use some sort of ruby package to serve up the redmine pages. I can easily have sub domains (and I do) just by putting things in sub dirs in /Library/WebServer/Documents/<mysubdomain>, I've got mediawiki and worpress going in there just fine. It's the whole ruby/virtualhost redirect thing that's got me stumped. I don't seem to be able to get virtual hosts working, and I am very foggy on how one stitches it together so it will serve up any kind of ruby pages, aside from just assigning it to some port using mongrel or webrick, but even then I don't get the full graphical goodness.

And yes, that name resolves to our url. I missed that when I was substituting a fake one for this post and now I can't see how to edit the original post to obscure it.

    (1-2/2)