I have set up my DocumentRoot to be, let's say, X.

Also, I have an Alias /web pointing to directory Y.

I can load the homepage at /web without any issue. But for any other page in the same website as the homepage of /web, Apache tries to load it from X instead of Y.

How can I make Apache to load all the contents of /web/* from Y/* instead of X/* ?

有帮助吗?

解决方案

Maybe you are missing out the Directory directive for the aliased directory?

This configuration works fine for me:

[...]
DocumentRoot /web
[...]
<Directory /web/>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride None
       Order allow,deny
       allow from all
</Directory>

Alias /web2/ "/var/www/"
<Directory "/var/www">
       Options FollowSymLinks
       AllowOverride None
</Directory>
[...]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top