首先這個錯誤是在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了。