Matthew
Matthew

Reputation: 7725

Serving two directories for one virtual host

Given the following:

/var/www -> web application 
/assets -> directory full of various assets

I cannot symlink /assets into /var/www, but need to include it as such:

www.foo.com -> web application
www.foo.com/assets -> should point to /assets

Is there a way to configure Apache to do this?

Upvotes: 0

Views: 33

Answers (1)

Steven Mastandrea
Steven Mastandrea

Reputation: 2772

Try the Alias directive, added to the host, which takes the URI and then the file location:

Alias /assets "/dir/foo/assets"

Upvotes: 1

Related Questions