We’ll use Apache to proxy requests to WEBrick on higher ports, allowing us to
maintain the applications separately, and even move the applications to different servers at some

First, Run Redmine on Webrick

Go to your app directory in commandline:

ruby script\server -p 4000 -e production --path=/redmine

Now the app will be running on http://localhost:4000.

Configure Apache to Proxy the Redmine

Make sure proxy is enabled.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

In <apache_root>\conf\extra\httpd-proxy.conf, put the following:

<Proxy *>
    Order deny,allow
    Allow from all

Create a new file in <apache root>\conf\extra\ called httpd-<appname>.conf Place the following into the file

Alias /redmine "P:/web/redmine/public"
<Directory "P:/web/redmine/public">
    Options Indexes FollowSymLinks
    AllowOverride none
    Order allow,deny
    Allow from all

<IfModule proxy_module>
<IfModule proxy_http_module>
    ProxyPass /redmine/images !
    ProxyPass /redmine/stylesheets !
    ProxyPass /redmine/javascripts !
    ProxyPass /redmine
    ProxyPassReverse /redmine http://localhost:4000/redmine
    ProxyPreserveHost On
    #continue with other static files that should be served by apache
    Alias /redmine/images P:/web/redmine/public/images/
    Alias /redmine/stylesheets P:/web/redmine/public/stylesheets/
    Alias /redmine/javascript P:/web/redmine/public/javascript/
    # Remove the following on public sites as this is insecure
    Alias /redmine/plugin_assets C:/Repositories/redmine/public/plugin_assets/
    Alias /redmine/help C:/Repositories/redmine/public/help/

Run Webrick on Startup

Place the following into a batch file and run it at startup (regedit "run" thingie or just simply place it in the Startup folder)

cd \web\redmine
ruby script\server -p 4000 -e production --path=/redmine -d

Note: the -d option will make Webrick run as a daemon.

Update: the "-d" option doesn't seem to work on Windows version of ruby ("daemon.rb:4:in `fork': fork() function is unimplemented on this machine"). So maybe without the -d option and set the no-window option in the batch file options.

Update: you can use Task Scheduler instead


Command: ruby Argument: script\server -p 4000 -e production --path=/redmine Start in P:\web\redmine "Runs with highest privileges" and "At startup"

On 7 June 2010