On 2013.10.27. 17:48, Tanguy Ortolo wrote:
> Hontvári József Levente, 2013-10-25 13:48+0200:
>> I would add, that creating the link
>> /etc/apache2/conf-available/dokuwiki.conf is not enough if dokuwiki is
>> installed in the root path, e.g. wiki.example.com. In that case
>> javascript-common.conf, which is dependency, will be read only after
>> dokuwiki.conf. The order is important, the javascript-common "Alias
>> /javascript /usr/share/javascript/" directive must come first, before
>> the  dokuwiki "Alias / /usr/share/dokuwiki/" directive. Using the link
>> name zzzdokuwiki.conf, for example, solves the ordering issue.
>
> Are you sure about that? For what I understand, order is not relevant
at all, since all these only defines what the web server will answer to
client's requests: requests to think in /dokuwiki will use one alias,
and thos in /javascript will use the other, no matter what request is
made first by the browser…

The emphasis is on "if dokuwiki is installed in the root path". In that
case the two aliases are "/javascript" and "/", which are overlapping.
When I first tried a link named "dokuwiki.conf" Apache2 issued a warning
telling that the second alias may override the first, and it may have no
effect. And when I tested it, /javascript was indeed inaccessible. I
have read a few pages from the Apache documentation, and this behavior
seems to be matching the documentation. It is strange, because in such
situations usually the longer prefix has the higher priority (Java
servlet mappings, Nginx Locations(?)), but likely there was a good
reason why they made Alias dependent on the declaration order.

Reply via email to