Apache 1.3 |
apache は WWW サーバの機能を提供してくれるフリーソフトである.
フリーであるが,その機能は非常に充実しており,アクセス制限や web ページの転送など,細かな設定を行うことができる.以下,apache のインストール,設定について記す.
■ メモ
- Apache は/usr/local/apache 以下にインストールする.
- Apache関係のログファイルは /usr/local/apache/logs/ 以下にとる.
- htpasswd などのコマンドが使えるようにパスを通す.
- 溜っていくログファイルを logrotate で分割する.
- 稼働状況を表示出来るようにする.
■ wget などでソースをダウンロード
■ インストール
- ダウンロードしたソースを /usr/src にコピー
# cp /home/mondo3/apache_1.3.37.tar.gz /usr/src/
- 適当なディレクトリにて展開
$ tar zxvf apache_1.3.37.tar.gz
$ cd apache_1.3.37
- インストール
$ ./configure --enable-module=status
$ make
# make install
ただし webcounter も組み込む場合 (webcouner のインストールは
こちら)は
$ ./configure --enable-module=status --activate-module=src/modules/cntr/libcntr.a
$ make
# make install
+--------------------------------------------------------+
| You now have successfully built and installed the |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the |
| (initially created or preserved) configuration files |
| |
| /usr/local/apache/conf/httpd.conf
| |
| and then you should be able to immediately fire up |
| Apache the first time by running: |
| |
| /usr/local/apache/bin/apachectl start
| |
| Thanks for using Apache. The Apache Group |
| http://www.apache.org/ |
+--------------------------------------------------------+
インストール完了.
■ 設定ファイルの変更
$ cd /usr/local/apache/conf
# vi httpd.conf
設定ファイルはここを参照.
■ パスを通す
- bashは /etc/profile、cshは /etc/csh.login に以下のように PATH 変数を追加する.
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11
:/usr/local/apache/bin"
■ ログの分割
- /etc/logrotate.conf を編集して圧縮オプションを追加する.
(compressのコメントアウトを外す)
- /etc/logrotate.d/ 以下に apache というファイルを置く.
編集内容はここを参照.
■ apache の起動
# /usr/local/apache/bin/apachectl start
-
なお,起動した apache を再起動したい場合には
# /usr/local/apache/bin/apachectl restart
を実行すればよい.また起動した apache を停止したい場合には
# /usr/local/apache/bin/apachectl stop
を実行すればよい.
|
|