Extend config.ru to support sub-uri ootb and cleanup all wiki pages
Almost all of the solutions on the wiki pages are outdated and either never worked or don't work anymore with version 4.x as discussed several times. From my point of view, the only sensible way is to extend config.ru. This approach works as expected. Unfortunately, I have wasted days over past few years at this point trying to get Redmine working under a sub-URI. This even led to me losing almost all of my beautiful hair. And just as ugly as it makes me look now, is trying through all the possibilities enumerated over several wiki pages.
My suggestion: The config.ru should therefore look like this out-of-the-box:
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) map ENV['REDMINE_RELATIVE_URL_ROOT'] || '/' do run RedmineApp::Application end
This can then be used to configure the Docker image by one variable, for example if you want to update a legacy system and can't reassign the uri because of backwards compatibility.
The config.ru would be usable unchanged with the default configuration and optionally for people who want or need to run redmine under a sub-URI.
Is there anything against changing the delivered config.ru in the codebase as mentioned above?
#1 Updated by Mizuki ISHIKAWA 5 months ago
Almost all of the solutions on the wiki pages are outdated and either never worked or don't work anymore with version 4.x as discussed several times.
Are you saying that the method of HowTo_Install_Redmine_in_a_sub-URI wiki page does not work well in newer versions?
If so, I think we need a way to easily set the sub-URI as you suggest.