Bug 390651 - Image path does not honor the servlet's context path (3.0-RC2)
Summary: Image path does not honor the servlet's context path (3.0-RC2)
Status: NEW
Alias: None
Product: Hudson
Classification: Technology
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Winston Prakash CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 03:50 EDT by Michael Wyraz CLA
Modified: 2012-10-05 02:59 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wyraz CLA 2012-09-28 03:50:35 EDT
Our Hudson runs in a context /hudson. Some images are still looked up in /images instead of /hudson/images (e.g. /images/48x48/setting.png).
Comment 1 Michael Wyraz CLA 2012-09-28 03:54:57 EDT
My current workaround (in apache config):
  RewriteEngine On
  RewriteRule ^/images/(.*)$ /hudson/images/$1 [R]
Comment 2 Winston Prakash CLA 2012-09-28 11:38:03 EDT
Hi Michael, Could you please give some examples URL where the error happens so that I can fix it before the release.
Comment 3 Michael Wyraz CLA 2012-10-04 11:36:49 EDT
Our urls are internal. But it should happen on every hudson setup that installs hudson in a context path (e.g. /hudson).
You can see this at the icons of every page (e.g. the tool icon on the settingas page nead the headline).

This links go to http://yourserver.com/images/48x48/setting.png but have to point to http://yourserver.com/CONTEXTNAME/images/48x48/setting.png
Comment 4 Michael Wyraz CLA 2012-10-04 11:40:25 EDT
Seems that on eclipse's Hudson this is changed. Example:
https://hudson.eclipse.org/sandbox/people/

The image there points to <img alt="" src="/sandbox/static/2d73a211/images/48x48/user.png">

In my installation it would point to <img alt="" src="/images/48x48/user.png">

Probably the image prefix can be set up somwehere?
Comment 5 Winston Prakash CLA 2012-10-04 13:01:21 EDT
(In reply to comment #4)

Actually https://hudson.eclipse.org/sandbox/ is the same RC2 you are using. Nothing special. 

BTW, are you proxying using apache server?
Comment 6 Winston Prakash CLA 2012-10-04 13:12:48 EDT
(In reply to comment #5)

In case you are proxying with apache make sure you have reverse proxy pass too

ProxyPass /hudson/  http://yourserver.com/hudson
ProxyPassReverse /hudson/ http://yourserver.com/hudson
Comment 7 Michael Wyraz CLA 2012-10-05 02:59:11 EDT
Yes, I do proxying. But I proxy the whole domain to the tomcat because there are several web applications.

I.e. I have
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080
ProxyPassReverse / http://127.0.0.1:8080
ProxyPassReverse / http://mydomain

Hudson (tomcat) runs on http://127.0.0.1:8080/hudson/