"Xinhao Zheng" <xinhaozheng.TakeThisOut@gmail.com> wrote in message
news:fab6e92e-00d8-45ea-ae87-3e21b82e91cd@l1g2000hsa.googlegroups.com...
> hi all,
>
> below is a snippet from apahce doc[http://httpd.apache.org/docs/2.2/
> mod/mod_alias.html#alias]
>
> i am a little confused about alias.
>
> Note that you may need to specify additional <Directory> sections
> which cover the destination of aliases. Aliasing occurs before
> <Directory> sections are checked, so only the destination of aliases
> are affected. (Note however <Location> sections are run through once
> before aliases are performed, so they will apply.)
>
> what does "Aliasing occurs before <Directory> sections are checked"
> mean?does it mean wherever the alias directive is,it will be done
> before <Directory>.
Basically, yes.
>
> "so only the destination of aliases are affected. " in this line,what
> does affected mean?
>
It means that given a DocumentRoot of /var/www/html and the alias directive:
Alias /here /var/www/somewhere-else
a directory section of
<Directory /var/www/html/here>
will not affect a request for
http://your-server/here/ as the alias
directive has told apache to map that request to a different directory.
you would need a directory section that points to the target of the alias -
<Directory /var/www/somewhere-else>