https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292015-09-18T07:20:51ZRedmineRedmine - Defect #20776: Redmine in a sub-URI does not workhttps://www.redmine.org/issues/20776?journal_id=660842015-09-18T07:20:51ZAnton Wiedermann
<ul></ul><p>now after some more searching I found <a class="message" href="https://www.redmine.org/boards/1/topics/48295">Problem running Redmine on a subfolder </a> which (is recent so I'm not the only one!! :) ) seems to suggest one possible solution, not sure if appropriate though (I'm no ruby/rails expert and I'd prefer if this worked out of the box)</p> Redmine - Defect #20776: Redmine in a sub-URI does not workhttps://www.redmine.org/issues/20776?journal_id=660852015-09-18T07:54:10ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Invalid</i></li></ul><p>Please use forum for questions.<br />It depends on web servers (passenger, thin, puma, etc.).</p> Redmine - Defect #20776: Redmine in a sub-URI does not workhttps://www.redmine.org/issues/20776?journal_id=660912015-09-18T12:12:29ZAnton Wiedermann
<ul></ul><p>figured it out after all... easy! :)</p>
<p>Perhaps this will help someone save few hours of work.. (I will not explain the values but it's not that difficult to understand once it's all written down in one place)</p>
<ol>
<li>append <code>Redmine::Utils::relative_url_root = '/redmine'</code> to redmine/conf/environment.rb</li>
<li>create passenger virtual host on port 3000 for redmine with sub-uri /redmine ... <code>> vim /etc/httpd/conf.d/redmine.conf</code><br /><pre><code class="xml syntaxhl">Listen 3000
<span class="nt"><VirtualHost</span> <span class="err">*:3000</span><span class="nt">></span>
ServerName 127.0.0.1
# document root for this server
DocumentRoot /var/www/redmine/public
# passenger config
PassengerRuby /usr/local/bin/ruby
PassengerAppRoot /var/www/redmine
PassengerBaseURI /redmine
PassengerDefaultUser redmine
# rails config
RailsBaseURI /redmine
RailsEnv production
# Relax Apache security settings
<span class="nt"><Directory</span> <span class="err">/var/www/redmine/public</span><span class="nt">></span>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
# Require all granted
<span class="nt"></Directory></span>
<span class="nt"></VirtualHost></span>
</code></pre></li>
<li>create proxy from port 80 and /redmine to the redmine virtual host ... <code>> vim /etc/httpd/conf/httpd.conf</code><br /><pre><code class="xml syntaxhl"><span class="nt"><VirtualHost</span> <span class="err">*:80</span><span class="nt">></span>
ServerName server
ServerAlias www.server
ProxyPass /redmine http://localhost:3000/redmine
ProxyPassReverse /redmine http://localhost:3000/redmine
<span class="nt"></VirtualHost></span>
</code></pre></li>
</ol>