新版的webmin,增加了SymLinksIfOwnerMatch 可能会导致一些网站导出现.htaccess的500错误
解决办法1:(修改.htaccess)
由于apache的FollowSymLinks有严重的bug漏洞,所以,webmin在新版本已经用SymLinksIfOwnerMatch来代替他。因此,如果你的.htaccess里面有FollowSymLinks,就会报500错误。这时候,您需要吧.htaccess里面的FollowSymLinks都替换为SymLinksIfOwnerMatch,保存,重启apache,理论上就不会500错误了。
解决办法2 (不修改.htaccess, 而是在webmin后台设置- 不推荐):
1.选中网站 2.找到服务下面的配置网站(如下图左侧) 3 . 点击编辑指令 4. 删除AllowOverride All 后面的options=这一大串, 5.保存 6.点webmin后台右上角停止Apache上面的 应用修改 来重启apache
delete-allowoverride-options.png
服务器高级管理员参考(终端用户不需要了解):
For those who are hosting your current clients, you can easily update the .htaccess for them to use SymLinksIfOwnerMatch by executing the following bash command:
find /home -name ".htaccess" -type f -exec sed -i 's/FollowSymLinks/SymLinksIfOwnerMatch/g' {} ";"
Do backup your files first before you perform this, just in case something goes wrong :)
However, if you don't wish to do that, and you are okay with the security issues that exist, you can always prevent Virtualmin from applying that fix in the future by editing the file /etc/webmin/virtual-server/config and adding the line allow_symlinks=1 to the end of the file.