Application URL prefix/root needs to be configurable and supported/used by the application/engine.
When we run foreman with katello as an engine, we need to be able to support running the application with a defined prefix/root (e.g. /foreman). An apache web server will route/proxy requests to the application; however, since apache will be routing requests to multiple applications (e.g. foreman+katello, pulp...etc), using / as the prefix is not sufficient.
The solution for addressing this needs to be investigated.
One possible solution might involve:
1. specify a RAILS root for the application (e.g. RAILS_RELATIVE_URL_ROOT=/foreman)
2. update foreman to support requests using the RAILS root (e.g. /foreman/hosts)
3. update katello engine to support requests using the RAILS root as well as the engine root (e.g. /foreman/katello/products)
1 & 2 should be supported today.
3 will definitely require some work. Based on some initial testing, it appears that routes used by angularjs are hard-coded to assume /katello; however, there may be other scenarios that are impacted. In order to address this, it may be possible to leverage either Rails.root + Katello::Engine.root or the url_prefix specified in katello.yml.