ここでは、Apache Web Serverのセキュリティ設定について説明します。
- 1.設定ファイルの編集
-
suコマンドにて、rootユーザーにスイッチしてください。
|
[guest@xxxxxx guest]$ su -
Password:
|
viコマンドで、設定ファイルを開きます。以下の内容を末尾に追加してください。
※通常、Apache Web Serverの設定ファイルは /etc/httpd/conf/httpd.conf です。
|
<FilesMatch "\.sh$">
SetHandler none
RemoveHandler .sh
RemoveType .sh
Require all denied
</FilesMatch>
|
編集が完了したら、viコマンドの":wq"(保存して閉じる)を実行してください。
- 2.httpdサービスの再起動
-
上記を設定後、httpdサービスを再起動してください。
以上で設定変更は終了です。
|
[guest@xxxxxx guest]$ su -
Password:
|