Having problem with reverse proxy (Apache on redmine server)
Added by Philip Dalrymple over 5 years ago
I am running redmine under puma with the setup as seen at the bottom of
this message. I am trying to get reverse proxy under Apache to work
with redmine. if I set the reverse proxy as follows:
## redmine on localhost <Location /redmine> ProxyPreserveHost on ProxyPass http://localhost:9292 ProxyPassReverse http://localhost:9292 </Location>
I have set the config/environment.rb as follows:
# Initialize the Rails application Rails.application.initialize! Redmine::Utils::relative_url_root = "/redmine"
The pages render correctly with I put in for example:
http://redmine-1.mdtsoft.com/redmine/admin/info
and when I look at the source of the HTML I see that all of the
script and link elements correctly have the /redmine/... in them
BUT
the hrefs do not.
for example:
<script src="/redmine/javascripts/jquery-1.11.1-ui-1.11.0-ujs-4.3.1.js?1558011181"></script> <script src="/redmine/javascripts/application.js?1558011533"></script> <script src="/redmine/javascripts/responsive.js?1558011535"></script> ====SNIP==== <form action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" /> ====SNIP==== <div class="flyout-menu__avatar "> <a href="/users/5"><img alt="" title="" class="gravatar" srcset="//www.gravatar.com/avatar/f4537a8bb642a0e50642375754f93dd3?rating=PG&size=160&default=wavatar 2x" src="//www.gravatar.com/avatar/f4537a8bb642a0e50642375754f93dd3?rating=PG&size=80&default=wavatar" /></a> <a class="user active" href="/users/5">pwd</a> </div>
-----------------------
I am new (first week) to redmine and to Ruby and Rails but do know Linux Postgers and Apache
not sure what I am missing here.
----------------------------------------------------------------------------------------
Server is Fedora release 29 (Twenty Nine)
with Postgers (from fedora package) of 10.7
Name : postgresql
Version : 10.7
Release : 1.fc29
Architecture: x86_64
Install Date: Mon 13 May 2019 10:06:08 AM EDT
Group : Applications/Databases
Size : 5816984
License : PostgreSQL
Signature : RSA/SHA256, Thu 21 Feb 2019 12:53:53 PM EST, Key ID a20aa56b429476b4
Source RPM : postgresql-10.7-1.fc29.src.rpm
Build Date : Mon 18 Feb 2019 05:12:16 AM EST
Build Host : buildhw-06.phx2.fedoraproject.org
Information
Redmine 4.0.3.stable
Default administrator account changed
Attachments directory writable
Plugin assets directory writable (./public/plugin_assets)
RMagick available (optional)
ImageMagick convert available (optional)
Environment:
Redmine version 4.0.3.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux]
Rails version 5.2.2.1
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery sendmail
SCM:
Subversion 1.11.1
Mercurial 4.5.3
Bazaar 2.7.0
Git 2.20.1
Filesystem
Redmine plugins:
no plugin installed
Replies (2)
RE: Having problem with reverse proxy (Apache on redmine server) - Added by Philip Dalrymple over 5 years ago
OK I have tried a number of things and either get the server not running at all or
the same symptoms, i.e. the javascript and css havethe right links but the menus
all are missing the /redmine after the host part.
I have tried setting the enviormant RAILS_RELATIVE_URL_ROOT=/redmine
and in config/enviorment.rb all of the following
# Initialize the Rails application Rails.application.initialize! ## relative_url_route works for javascript not for menu entries #Redmine::Utils::relative_url_root = "/redmine" ## default_scope does not work for either #RedmineApp::Application.routes.default_scope = "/redmine" ## ActionController:Base.relative_url_route again script right menus not #ActionController::Base.relative_url_root = "/redmine"
All do the save thing except for ...default_scope which does not pub /redmine on anything
RE: Having problem with reverse proxy (Apache on redmine server) - Added by Michel Condemine about 4 years ago
Hello,
did you find a solution for this issue ?
Regards
Michel