httpd の install の方法
(1)自分のサイトに /usr/local/etc/httpd を作ります。
(2) ftp site から httpd の tar file をget して解凍します。
(例えば、 httpd_1.4.2_sunos4.1.3.tar.Z )
% su
# cd /usr/local/etc/
/usr/local/etc/に httpd_1.4.2_sunos4.1.3.tar.Z があるとします。
# uncompress httpd_1.4.2_sunos4.1.3.tar.Z
# tar xf httpd_1.4.2_sunos4.1.3.tar
# rm httpd_1.4.2_sunos4.1.3.tar
# mv httpd_1.4.2 httpd
# cd httpd
以下があることを確認します。
conf/*,htdocs/*,htpasswd,httpd,unescape
home page を 作る空間に シンボリック リンク をはります。
htdocs の下にない file は WWW では見ることができません。
# cd htdocs
# ln -s /home home (例えば /home を シンボリック リンクします
注意: この場合 access を制御して下さい。(下参照)
さもないと /home 以下が全て見えてしまいます。)
(3)自分の host の /etc/services に
http 80/tcp
の行を追加します。
(4)自分の host の /etc/inetd.conf に
http stream tcp nowait root /usr/local/etc/httpd/httpd httpd
を追加します。
(5)自分の host の /usr/local/etc/httpd/conf/httpd.conf を
変更します。
ServerAdmin,ServerRoot,その他
ServerType inetd
(6)自分の host の /usr/local/etc/httpd/conf/srm.conf を
変更します。
DocumentRoot,UserDir,その他
(7)自分の host の /etc/aliases に付け加えます。
www : ユーザーの名前
(8) inet を更新します。
# ps -aux | grep inetd
で pid(数字) を 確認して
# kill -HUP pid
これで動くはずです。試して見て下さい。
./conf/access.conf で読むことのできる dir を指定できます。
dome.ee.uec.ac.jp の設定例を示します。
access.conf の例
# access.conf: Global access configuration
# Online docs at http://hoohoo.ncsa.uiuc.edu/
# I suggest you consult them; this is important and confusing stuff.
# This should be changed to whatever you set DocumentRoot to.
# This may also be "None", or any combination of "Indexes",
# "Includes", or "FollowSymLinks"
# Options Indexes FollowSymLinks ExecCGI
Options All
#
# This controls which options the .htaccess files in directories can
# override. Can also be "None", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
AllowOverride All
AddType text/x-server-parsed-html .html
# Controls who can get stuff from this server.
# order allow,deny
allow from all
# You may place any other directories you wish to have access
# information for after this one.
#
# /home の下は、http という directory か doc という directory
# しかみえないように設定。
#
Options None
AllowOverride None
order deny,allow
deny from all
#
Options All
AllowOverride All
order allow,deny
allow from all
#
Options All
AllowOverride All
order allow,deny
allow from all