0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ApatchでSetEnvを設定したらエラーが出た時の対処

Posted at

何が起きたの?

ApachでSetEnvを利用しようとしたら以下のエラーが発生しました。

Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration

どんな内容のエラー?

Google先生の翻訳内容は↓

無効なコマンド「SetEnv」。スペルが間違っているか、サーバー構成に含まれていないモジュールによって定義されている可能性があります。

原因

env_moduleってのが存在しないために発生していたエラー
以下に記載されていました。
https://httpd.apache.org/docs/2.2/ja/mod/mod_env.html

対処方法

私の環境では、コメントアウトされてました。
対処手順は以下の通りです。

cd /etc/httpd/conf/
vi httpd.conf
(検索)/env_module
# LoadModule env_module modules/mod_env.so
↓
LoadModule env_module modules/mod_env.so
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?