Mediawikで500エラーを起こす場合

提供: dococo wiki
ナビゲーションに移動 検索に移動

自分が悩んだ事象をGoogleで検索していて解決法が書かれていたサイトが自分のサイトだったという間抜けな事があったので、表現を変えて再度記載する

Internal Server Error

Mediawikで新規インストールやリストアを行ったときに。さくらインターネットのレンタルサーバーで500 Internal Server Error が出て、画像が表示できなくなった。

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@sakura.ad.jp and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.

原因

非常に簡単です
さくらのサポート情報に以下の内容があります
.htaccessによるアクセス制御
Optionsの設定は可能ですが、AllおよびFollowSymlinksは指定できません。

だそうです。

それなのに Mediawikの/images以下の.htaccessには以下の通り

# Protect against bug T30235
<IfModule rewrite_module>
	RewriteEngine On
	RewriteOptions inherit
	RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
	RewriteRule . - [forbidden]
	# Fix for bug T64289
	Options +FollowSymLinks
</IfModule>

Options +FollowSymLinksが入っていたためMediawikで500エラーが発生していました。この行を削除することで正常に画像表示されます。
MediawikiでInternal Server Error発生ここにも書いていました