[users@httpd] How to get Alias and ProxyPass working in vhost file with Location and Directory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 *>
  ServerName myserver.host.com
  ProxyPassReverse / http://localhost:3000/
  ProxyPass / http://localhost:3000/
# Other entries like LogLevel, ErrorLog, etc.
</VirtualHost>

# 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
</Directory>

However I cannot access the images from
http://myserver.host.com/images/whatever.jpg - 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.

Suggestions?

Thanks,

-Chris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux