首先这个错误是在apache添加了认证之后出现的,MediaWIKI保存文章的时候提示出错。
回顾一下,Ubuntu18.04/Apache2 添加认证,在apache2.cnf文件修改为:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthName "Auth Access1"
AuthType Basic
AuthUserFile /var/www/html/htpasswd.users
Require valid-user
</Directory>
要改掉这个错误,再增加两句,现在是:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthName "Auth Access1"
AuthType Basic
AuthUserFile /var/www/html/htpasswd.users
Require local
Require env visualeditor
Require valid-user
</Directory>
重启apache,
systemctl apache2
再次保存文章就OK了。