Apache2 alias in virtual host

Posted by 0x7c00 on Server Fault See other posts from Server Fault or by 0x7c00
Published on 2011-04-13T06:11:48Z Indexed on 2012/06/18 9:18 UTC
Read the original article Hit count: 376

Filed under:
|
|

I have multiple virtual host in one server and plan to has some alias setup in one virtualhost.

So I add the

Alias /foo/ /path/to/foo/

in virtualhost directive,but it has no effect. request of host1/foo/ will return 404. But if I add this to /etc/apache2/mods-available/alias.conf, it works. But the problem is host2 will also share this alias.

Is there a way to make the alias work only for host1?

B.T.W, I use apache2ctl -l, there's no mod_alias.c listed, weird.

© Server Fault or respective owner

Related posts about alias

Related posts about virtualhost