是否可以只为一个 VirtualHost启用UserDir 指令,而不是为所有人启用它,然后为每个您不想要的 VirtualHost 禁用它(使用“UserDir disable”)?
我已经尝试将它放在 a 中<VirtualHost>
并注释掉全局配置(/etc/apache2/conf.d/userdir.conf)中的所有内容。虽然没有运气。
<IfModule mod_userdir.c>
UserDir public.www
UserDir disabled root
<Directory /home/*/public.www>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
Run Code Online (Sandbox Code Playgroud)