Dan Kelley wrote:
Michael Wang wrote:
Is there a reason why the solution I posted in my message in the second
thread above does not work for you? If you are having problems with
images in a CSS stylesheet you'll need something like this:
The problem is that I don't get images. (Actually, at the moment, I don't even get a site, unless I use 127.0.0.1, but I've taken several steps backward lately, so if I can just get images I'll be happier!)
I start mongrel with the command
mongrel_rails start -d -p 8010 -a 127.0.0.1 -e development --prefix /LSCbc
and my http.conf contains as below.
# DEK 20070429 start
Alias /LSCbc "/Users/kelley/Sites/LSCbc/public"
Options Indexes FollowSymLinks
Allow from all
ProxyPass /LSCbc/images !
ProxyPass /LSCbc/stylesheets !
ProxyPass /LSCbc/ http://127.0.0.1:8010/LSCbc
#ProxyPass /LSCbc/images http://127.0.0.1:8010/LSCbc/images
ProxyPass /LSCbc http://127.0.0.1:8010/LSCbc
ProxyPassReverse /LSCbc/ http://127.0.0.1:8010/LSCbc
# DEK 20070429 end
and the result is that images (used by my stylesheet) do not show up. They are called as follows, in my public/stylesheets/style.css file:
background: url('/images/headerlogo.png') bottom left no-repeat transparent;
Well you have a problem cause you have a generic "/images" directory reference and multiple apps that can point to it. You have to resolve the ambiguity somehow.
One way is as described in my link above which you almost have correct but not quite:
ProxyPass /images http://127.0.0.1:8010/LSCbc/images
but then you would have to stick all your stylesheet images from all your apps into the LSCbc images directory.
Another way is to put the app in the images path in the stylesheets and setup ProxyPass that way (like the way you have commented out), i.e.:
background: url('/LSCbc/images/headerlogo.png') bottom left no-repeat