memorandum
FrontPage
管理
ヘルプ
VineLinux3.x/Apache2.2/インストールおよび設定
をテンプレートにして作成
開始行:
*概要 [#b866e66f]
-http://www.apache.jp/
*設定手順 [#v21e3bd1]
ダウンロード&解凍
# wget http://www.apache.jp/dist/httpd/httpd-2.2.2.tar.gz
14:56:24 (607.73 KB/s) - `httpd-2.2.2.tar.gz' を保存しま...
# tar zxf httpd-2.2.2.tar.gz
# cd httpd-2.2.2
SSLに対応させたいのでopenssl-develを入れておく。
# apt-get install openssl-devel
インストール。オプションは適当に。
# ./configure --enable-mods-shared='auth_digest headers ...
# make
# make install
起動してみる。
# /usr/local/apache2/bin/apachectl start
ブラウザでアクセスしてみる。
It works!
前バージョンまでに比べ、限りなく寂しい画面が現れる。
ドキュメントルートディレクトリの作成。
# mkdir -p /home/httpd/html
動作ユーザーの作成。
# useradd -s /bin/false -d /dev/null apache
設定ファイルの編集
# vi /usr/local/apache2/conf/httpd.conf
>
動作ユーザーの設定
User apache
Group apache
サーバ名
ServerName 192.168.0.2:80
ドキュメントルート
DocumentRoot "/home/httpd/html"
htmlディレクトリの設定
<Directory "/home/httpd/html">
Options MultiViews SymLinksIfOwnerMatch Includes
</Directory>
〜/でアクセスしたときに表示するファイル
<IfModule dir_module>
DirectoryIndex index.html index.shtml index.php
</IfModule>
ホスト名の逆引きを行う
HostnameLookups On
ログの設定
<IfModule log_config_module>
ローカルからのアクセスはhomelogに記録
SetEnvIf Remote_Addr 192.168.0. homelog nolog
SetEnvIf Remote_Addr 127.0.0.1 homelog nolog
サーチエンジンのアクセスはrobotlogに記録
SetEnvIf Remote_Host "(msn)|(bloglines)|(inktomi)|(g...
SetEnvIf Remote_Addr 60.28.17. robotlog nolog
homelogはhome_logに記録
CustomLog logs/home_log common env=homelog
robotlogはrobot_logに記録
CustomLog logs/robot_log common env=robotlog
nolog以外はaccsess_logに記録
CustomLog logs/access_log combined env=!nolog
</IfModule>
エイリアス
Alias /cgi-bin/ "/home/httpd/cgi-bin/"
cgi-binディレクトリの設定
<Directory "/home/httpd/cgi-bin">
AllowOverride None
Options FollowSymLinks MultiViews ExecCGI
Order allow,deny
Allow from all
</Directory>
cgi許可
AddHandler cgi-script .cgi
SSI許可
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
自動起動スクリプトを作成し/etc/init.d/に入れる。
#ref(apache2)
# cp apache2 /etc/init.d/
# chmod 755 /etc/init.d/apache2
起動
# /etc/init.d/apache2 restart
httpdを停止中: ...
httpdを起動中: ...
自動起動するようにする。
# ntsysv
* コメント [#e0f9ad28]
#comment
終了行:
*概要 [#b866e66f]
-http://www.apache.jp/
*設定手順 [#v21e3bd1]
ダウンロード&解凍
# wget http://www.apache.jp/dist/httpd/httpd-2.2.2.tar.gz
14:56:24 (607.73 KB/s) - `httpd-2.2.2.tar.gz' を保存しま...
# tar zxf httpd-2.2.2.tar.gz
# cd httpd-2.2.2
SSLに対応させたいのでopenssl-develを入れておく。
# apt-get install openssl-devel
インストール。オプションは適当に。
# ./configure --enable-mods-shared='auth_digest headers ...
# make
# make install
起動してみる。
# /usr/local/apache2/bin/apachectl start
ブラウザでアクセスしてみる。
It works!
前バージョンまでに比べ、限りなく寂しい画面が現れる。
ドキュメントルートディレクトリの作成。
# mkdir -p /home/httpd/html
動作ユーザーの作成。
# useradd -s /bin/false -d /dev/null apache
設定ファイルの編集
# vi /usr/local/apache2/conf/httpd.conf
>
動作ユーザーの設定
User apache
Group apache
サーバ名
ServerName 192.168.0.2:80
ドキュメントルート
DocumentRoot "/home/httpd/html"
htmlディレクトリの設定
<Directory "/home/httpd/html">
Options MultiViews SymLinksIfOwnerMatch Includes
</Directory>
〜/でアクセスしたときに表示するファイル
<IfModule dir_module>
DirectoryIndex index.html index.shtml index.php
</IfModule>
ホスト名の逆引きを行う
HostnameLookups On
ログの設定
<IfModule log_config_module>
ローカルからのアクセスはhomelogに記録
SetEnvIf Remote_Addr 192.168.0. homelog nolog
SetEnvIf Remote_Addr 127.0.0.1 homelog nolog
サーチエンジンのアクセスはrobotlogに記録
SetEnvIf Remote_Host "(msn)|(bloglines)|(inktomi)|(g...
SetEnvIf Remote_Addr 60.28.17. robotlog nolog
homelogはhome_logに記録
CustomLog logs/home_log common env=homelog
robotlogはrobot_logに記録
CustomLog logs/robot_log common env=robotlog
nolog以外はaccsess_logに記録
CustomLog logs/access_log combined env=!nolog
</IfModule>
エイリアス
Alias /cgi-bin/ "/home/httpd/cgi-bin/"
cgi-binディレクトリの設定
<Directory "/home/httpd/cgi-bin">
AllowOverride None
Options FollowSymLinks MultiViews ExecCGI
Order allow,deny
Allow from all
</Directory>
cgi許可
AddHandler cgi-script .cgi
SSI許可
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
自動起動スクリプトを作成し/etc/init.d/に入れる。
#ref(apache2)
# cp apache2 /etc/init.d/
# chmod 755 /etc/init.d/apache2
起動
# /etc/init.d/apache2 restart
httpdを停止中: ...
httpdを起動中: ...
自動起動するようにする。
# ntsysv
* コメント [#e0f9ad28]
#comment
ページ名:
検索
AND検索
OR検索
編集操作
一覧
単語検索
最終更新
バックアップ
ヘルプ
トップページ
http://kayanomori.net/
↑
アクセス数
本日:0人
昨日:0人
総数:0人
現在:6人
最新の20件
2022-07-16
投票箱
2022-01-30
FrontPage
2022-01-29
めも
2018-02-03
SandBox
PukiWiki
InterWikiName
FormattingRules
PukiWiki/1.4/Manual/Plugin/O-R
PukiWiki/1.4/Manual/Plugin/S-U
InterWiki
日本語
複数画像アップ掲示板 ECOUP(エコアップ) v1.31
日記/2006-12-12
日記
日記/2005-10-04
特定のオートコンプリート履歴だけを削除する
日記/2005-10-06
小ネタ集/WordPress
日記/2005-10-05
整形ルール
edit