Proxy setup for Hudson

apache-2.2hudsonmod-proxy

I'm trying to setup a hudson server which is accessed from an apache proxy. The Hudson index page loads but no images, css or javascript are loaded. It seems as relative paths are not working correctly. My current apache configuration for the proxy is the following:

/etc/apache2/available-sites/default:

<VirtualHost *:8000>
    [...]
    #Hudson
    RewriteEngine On
    ProxyPass         /hudson  http://localhost:8081
    ProxyPassReverse  /hudson  http://localhost:8081
    ProxyRequests     Off
    ProxyPreserveHost On

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
</VirtualHost>

The next screenshot shows how the hudson index is displayed:

(don't have enough reputation to post the image sorry, but imagine the hudson index with no images or css, just black text and blue links)

I think the problem is in my apache config but I can't find any information about this error.

Thanks in advance.

Best Answer

Use "--prefix=/hudson" in /etc/default/hudson and:

ProxyPass         /hudson  http://localhost:8081/hudson
ProxyPassReverse  /hudson  http://localhost:8081/hudson

or

ProxyPass         /  http://localhost:8081
ProxyPassReverse  /  http://localhost:8081
Related Topic