Project

General

Profile

Installing redmine as a sub-uri under Cherokee

Added by Greg Sarjeant about 14 years ago

General diagnostics:

Operating System: FreeBSD 7.2-p7
Database: mysql-5.0.90
Ruby-aware server: Webrick
Cherokee Version: 0.99.38

Output of script/about:

Ruby version              1.8.7 (i386-freebsd7)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/local/www/redmine
Environment production
Database adapter mysql
Database schema version 20091227112908

Hello,

I'm trying to get redmine running as a sub-URI under cherokee. I'm having trouble with the relative links. Currently, I have the following environment:

- redmine installed and listening on port 3000 with webrick
- cherokee installed and listening on port 80

Everything works fine when I just go to the default ports. I would like to be able to access redmine at http://my.host.com/redmine. I have looked through the cherokee and redmine docs, and it seems like the most straightforward way to do this is to keep redmine running on port 3000 and use a Reverse HTTP proxy to set up the sub-URI. So, I modified the deafult configs as follows:

Redmine
1. Added Redmine::Utils::relative_url_root = "/redmine" to config/environment.rb

Cherokee
1. Created an information source for redmine, pointing to localhost:3000
2. Created a rule under the default Virtual Server with the following properties:
  • Type: Directory
  • Target: /redmine
  • Handler: HTTP reverse proxy
  • Allow Keepalive: enabled
  • Information sources: redmine

All other options are left at their defaults. When I restart everything, redmine shows up at http://my.host.com/redmine. However, I lose all of the formatting and I imagine that the javascript function references aren't working, either. When I view the page source, relative links are refered to as /redmine/<whatever>. If I try to go to any of those links, though, I get redmine's 404 error.

I think I'm close, but there's something I'm missing about getting those relative links to work. Is anybody else using this setup successfully? Does anything in my configuration sound suspicious?

Thanks.


Replies (3)

RE: Installing redmine as a sub-uri under Cherokee - Added by Greg Sarjeant about 14 years ago

FYI: It works using Cherokee's RoR Wizard as long as I have the app resolve as http://redmine.my.host.com (rather than http://my.host.com/redmine). I'll just go with that approach.

Thanks.

RE: Installing redmine as a sub-uri under Cherokee - Added by Taher Shihadeh over 13 years ago

I've just set it up on a sub-uri with Cherokee 1.0.8 and Redmine 1.0.1 and it works just fine.

Probably a bug got fixed along the way in one of the two projects.
I simply used the RoR wizard and made the changes to config/environment.rb described above.

RE: Installing redmine as a sub-uri under Cherokee - Added by Gugi Gustaman over 13 years ago

I have installed redmine with above steps. Firstly, i got redMine 404 error. Now, the pages loaded successfully, but without style (CSS). I attached the screenshot of my redmine. Any idea?

Thanks.

    (1-3/3)