httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Dagnon" <>
Subject [users@httpd] How to get Alias and ProxyPass working in vhost file with Location and Directory?
Date Mon, 14 Aug 2006 16:17:51 GMT
Hello all, this is an expert-level question from a newbie:

I've got a vhost file setup to ProxyPass off to Rails on port 3000, but
now we're told we have to server images and CSSs from a shared directory
elsewhere.  The thought is to have a /www/static/images/ where all images
live and are served from.  This is what my working vhost file looks like:

<VirtualHost *>
  ProxyPassReverse / http://localhost:3000/
  ProxyPass / http://localhost:3000/
# Other entries like LogLevel, ErrorLog, etc.

# a couple <Location ...>..</Location> entries for permissions

Now if I add the following entry after </VirtualHost> I'm able to view the
images at http://localhost/images/whatever.jpg:

Alias /images/ /www/static/images/
<Directory /www/static/images>
  Order allow,deny
  Allow from all

However I cannot access the images from - that only returns 404
errors.  I've attempted to put the Alias line (and sometimes the Directory
entry) inside the VirtualHost, even before the ProxyPass/Reverse lines
with no change in behaviour.  Other alternatives were to try a SymLink
with Option FollowSymLink or ProxyMatch - except that doesn't seem to have
a Directory directive - or another ProxyPass - but would that be something
like ProxyPass /images/ http://localhost:80/images/?

The documentation I've found so far has no examples, and my Google-fu
seems to be lacking here.




The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message