Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I set the path on which Redmine should be run, e.g. example.com:3000/redmine instead of example.com:3000? There is an appropriately named option in the settings panel, but it serves a different purpose, according to the documentation and experimental observations (it is used to write URL in emails sent to users).

A wider picture: I need this in order to properly serve Redmine on port 80 over Apache's mod_proxy (i.e. at example.com/redmine). The problem is that when running it on /, the home page fails to load the necessary resources (such as JavaScript and CSS files). Any workarounds?

share|improve this question
add comment

2 Answers

The usage of output filters is actually a bad idea, as I can't work everywhere.

A better idea would be to instruct your app-server (mongrel, thin, whatever) to tell Rails the base URL where the app is deployed. That way, Rails can directly generate the correct links. This can be done by appending --prefix /redmine to the app-server parameters.

In the cluster.xml file used by mongrel_cluster, the same can be accomplished by inserting

prefix: /redmine

into it. (at least, I believe this syntax is correct)

share|improve this answer
add comment
up vote 0 down vote accepted

I made use of the Proxy-HTML module:

    ProxyPass /redmine http://example.com:3000
    ProxyHTMLURLMap http://example.com:3000 /redmine
    <Location /redmine>
        ProxyPassReverse http://example.com:3000
        SetOutputFilter proxy-html
        ProxyHTMLURLMap /               /redmine/
        ProxyHTMLURLMap /redmine/       /redmine
    </Location>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.