How to change Foreman access URL?

Dear All,

I'm trying put Foreman behind an apache2 proxy without having to install
& configure Passenger, and I need to figure out how to configure Foreman so
I could change the access url (context path?). Example : I'd like to call
Foreman http://server.domain-test.com:3000*/foreman* instead
of http://server.domain-test.com:3000*/*

For info, Foreman version is 1.2.0 and is installed as standalone
application via Yum.

If I understand that correctly you are running foreman via thin and trying to
configure your Apache as a proxy. In order to do that you must configure your
virtual host similarly to this:

<Proxy balancer://foreman-thin-unattended-servers>
BalancerMember http://127.0.0.1:3000/unattended" %>
BalancerMember http://127.0.0.1:3001/unattended" %>
</Proxy>

Allow http for unattended path (for anaconda etc.)

<Location /foreman/unattended>
ProxyPass balancer://foreman-thin-unattended-servers
ProxyPassReverse balancer://foreman-thin-unattended-servers
</Location>

Redirecto to https version otherwise

<LocationMatch /foreman(?!/unattended)>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule /(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
</LocationMatch>

In this example foreman thins run on two ports 3000 and 3001 and Apache
responds on /foreman suburi.

Hope this helps.

··· On Friday 19 of July 2013 02:24:44 Med wrote: > Dear All, > > I'm trying put Foreman behind an apache2 proxy *without* having to install > & configure Passenger, and I need to figure out how to configure Foreman so > I could change the access url (*context path?).* Example : I'd like to call > Foreman http://server.domain-test.com:3000*/foreman* instead > of http://server.domain-test.com:3000*/* > > For info, Foreman version is 1.2.0 and is installed as standalone > application via Yum.


Marek