Webサーバーをインストールした
VPSにApacheをインストールしたのでそのメモを記します。
Apacheのインストール
パッケージで管理がしたかったので迷わずyumでインストールを実行した。
#Apache sudo yum install httpd.x86_64 sudo yum -y install httpd.x86_64 system-config-httpd.noarch httpd-devel.x86_64
サービス起動設定も忘れずにしておく
chkconfig コマンドで忘れずに。
sudo /sbin/chkconfig httpd on
httpd.confで隠したい設定
「Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.2」などのサーバ情報は、隠しておいても
デメリットはないので、とりあえず、隠す。
応答ヘッダーを「Server: Apache」とする。
エラーページに表示する情報も隠しておく。(ServerSignature)
ServerTokens ProductOnly ServerSignature Off
ドメインの設定
ServerName **.**
とりあえずこの設定で再起動する。
/etc/rc.d/init.d/httpd restart httpd を停止中: [ OK ] httpd を起動中: [ OK ]
おまけ
メモリ使用状況をアップしておきます。
(freeコマンドの内容です。)
total | used | free | shared | buffers | cached | |
---|---|---|---|---|---|---|
Mem: | 510532 | 420576 | 89956 | 0 | 15024 | 314740 |
buffers/cache: | 90812 | 419720 | ||||
Swap: | 2048276 | 84 | 2048192 |
では!