練習

  1. telnet コマンドで隣のマシンにお邪魔する。
    fs% telnet sw04
    Trying 133.97.168.104...
    Connected to sw04.is.kochi-u.ac.jp.
    Escape character is '^]'.
    
    
    UNIX(r) System V Release 4.0 (sw04)
    
    login: tkikuchi
    Password: 
    Last login: Fri Jan 28 19:40:08 from tw
    Sun Microsystems Inc.   SunOS 5.5.1     Generic May 1996
    You have mail.
    sw04% who
    98ss068    console       7月  2 20:49
    tkikuchi   pts/1         7月  6 16:25   (fs-168)
    sw04% exit
    sw04% ログアウト
    Connection closed by foreign host.
    fs% 
    
  2. telnet コマンドで隣のマシンの時計をチェック
    fs% telnet sw04 daytime
    Trying 133.97.168.104...
    Connected to sw04.is.kochi-u.ac.jp.
    Escape character is '^]'.
    Fri Jul  6 16:29:18 2001
    Connection closed by foreign host.
    fs% 
    
  3. telnet コマンドで コースの WWW サーバに接続してみる。
    ss004% telnet ws 80
    Trying 133.97.166.19...
    Connected to ws.is.kochi-u.ac.jp.
    Escape character is '^]'.
    GET / HTTP/1.0
    
    HTTP/1.1 403 Forbidden
    Date: Fri, 06 Jul 2001 07:15:51 GMT
    Server: Apache/1.3.9 (Unix)
    Connection: close
    Content-Type: text/html
    
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    .....
    Connection closed by foreign host.
    ss004% 
    
  4. HTTP サーバを立ち上げる。 自分が立ち上げた HTTP サーバ (Port 8080 で起動) に接続してみる。
    ss004% ~/www/bin/apachectl start
    /home/tkikuchi/www/bin/apachectl start: httpd started
    ss004% telnet localhost 8080
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    GET / HTTP/1.0
    
    HTTP/1.1 200 OK
    Date: Fri, 06 Jul 2001 07:45:15 GMT
    Server: Apache/1.3.19 (Unix)
    Connection: close
    Content-Type: text/html
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    ...
    </BODY></HTML>
    Connection closed by foreign host.
    ss004% 
    
  5. ブラウザ(Netscape)を使って自分が立ち上げたサーバにアクセスしてみる (URLを入力 http://swXX.is.kochi-u.ac.jp:8080/)
  6. HTTP サーバの停止
    ss004% ps -u tkikuchi -f | grep http
    tkikuchi  8091  8084  0 16:45:09 ?        0:00 /pub/solaris/apache/bin/httpd -d /home/tkikuchi/www
    ...
    ss004% ~/www/bin/apachectl stop
    /home/tkikuchi/www/bin/apachectl stop: httpd stopped
    ss004% 
    

パソコンを使う場合、MS-DOS プロンプトから telnet を起動する。 3. の WWW サーバへの接続では、キーボードからの入力がエコーバック されないので注意する。

4. HTTP サーバの立ち上げ



課題:自分が立ち上げた http サーバのアクセスログ (~/www/logs/access_log) をメールに入れて tkikuchi@is.kochi-u.ac.jp まで送ってください。
課題2: /pub/solaris/apache/cgi-bin/ に入っている CGI (Common Gateway Interface) プログラムを ~/www/cgi-bin/ にコピーして実行できるように しなさい. Apache のマニュアル を参考にすること.
さらに,SSI (Server Side Include) による動的なコンテンツ提供法などに ついても研究すること.
何がどこまでできたかがわかるように,上記アドレスまでレポートする.