Quantcast
Channel: 22pF » programming
Viewing all articles
Browse latest Browse all 2

CruiseControl.rb with Apache as front-end

$
0
0

I run CruiseControl.rb for a few personal projects on a server on the home LAN. CCrb comes with its own web server running by default on port 3333, but I wanted to use my Apache server as a front-end. Doing this through mod_proxy is normally pretty easy. However, I quickly get into trouble with the absolute URLs coming from CCrb as it assumes it is running at the root URL. After some head scratching I find an environment variable for Rails called RAILS_RELATIVE_URL_ROOT, but setting it doesn’t change the URLs at all. More head scratching. I finally find the solution! Below is the necessary configuration.

CruiseControl.rb

Apache VirtualHost configuration

<Proxy>
    Order deny,allow
    Allow from all
</Proxy>
ProxyRequests off
ProxyPass /cc/ http://localhost:3333/
ProxyPassReverse /cc/ http://localhost:3333/

CruiseControl.rb: config/environments/production.rb

ActionController::AbstractRequest.relative_url_root = "/cc"

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images