Apache2のインストール

  1. Yastで[ネットワークサービス]-[HTTPサーバ]を選択します。
    apache-0.png
  2. ネットワークデバイスの選択では特に変更するところはありません。
    apache-1.png
  3. モジュールはとりあえず全てチェックします。
    apache-2.png
  4. ここでは、[サーバ名]と[サーバ管理者のメールアドレス]を変更します。
    apache-3.png
  5. 仮想ホストについては特に変更するところはありません。
    apache-4.png
  6. 最後にApache2サーバを自動起動するようにします。
    apache-5.png

シンボリックリンクを許可するように変更

# vi /etc/apache2/default-server.conf
     8 #
     9 # Configure the DocumentRoot
    10 #
    11 <Directory "/srv/www/htdocs">
    12         # Possible values for the Options directive are "None", "All",
    13         # or any combination of:
    14         #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    15         #
    16         # Note that "MultiViews" must be named *explicitly* --- "Options All"
    17         # doesn't give it to you.
    18         #
    19         # The Options directive is both complicated and important.  Please see
    20         # http://httpd.apache.org/docs-2.0/mod/core.html#options
    21         # for more information.
    22 #Options None
    23 Options *SymLinksIfOwnerMatch
    24         # AllowOverride controls what directives may be placed in .htaccess files.
    25         # It can be "All", "None", or any combination of the keywords:
    26         #   Options FileInfo AuthConfig Limit
    27 AllowOverride None
    28         # Controls who can get stuff from this server.
    29 Order allow,deny
    30  Allow from all
    31 </Directory>
:wq

22行目をコメントアウトし、23行目を追記します。この設定はシンボリックリンクと実体のownerが同じ時にリンクをたどることを許可すると言うことです。

デフォルトファイルの追加

# vi /etc/apache2/httpd.conf
   161
   162 # List of resources to look for when the client requests a directory
   163 DirectoryIndex index.html index.html.var index.php
   164
:wq

URLにファイル名を指定しないときに読み込むファイル名に index.php を追加します。

最後にApacheを再起動します。

# /etc/init.d/apache2 restart

インターネットへの公開

  1. ADSLルータの設定で、HTTP(80)、HTTPS(443)をこのマシンに転送するようにします。

gzip圧縮

  1. /etc/apache2/conf.d/deflate.conf に、設定ファイルを記述します。ここでは Yast の設定で mod_deflate をロードしているので LoadModule? はコメントアウトしています。
         1 # @see http://httpd.apache.org/docs/2.0/ja/mod/mod_deflate.html
         2 #
         3 # LoadModule deflate_module modules/mod_deflate.so
         4
         5 SetOutputFilter DEFLATE
         6
         7 ########################
         8 # Buffer Size of zlib
         9 ########################
        10 DeflateBufferSize 8096
        11
        12 ########################
        13 # Compress Level 1(Low)-9(High)
        14 ########################
        15 DeflateCompressionLevel 9
        16
        17 ########################
        18 # Memory Size of zlib 1(Low)-9(High)
        19 ########################
        20 DeflateMemLevel 9
        21
        22 ########################
        23 # Windows Size of zlib 1(Low)-15(High)
        24 ########################
        25 DeflateWindowSize 15
  2. apache の再起動をします
    # /etc/rc.d/apache2 restart
    Syntax OK
    Shutting down httpd2 (waiting for all children to terminate)          done
    Starting httpd2 (prefork)                                             done
  3. 圧縮の確認をします( http://www.port80software.com/support/p80tools )
    deflate.png

Suse 10 Server


添付ファイル: filedeflate.png 2055件 [詳細] fileapache-5.png 2092件 [詳細] fileapache-3.png 2182件 [詳細] fileapache-4.png 2168件 [詳細] fileapache-0.png 2073件 [詳細] fileapache-1.png 2045件 [詳細] fileapache-2.png 2141件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2006-05-07 (日) 12:18:37 (6557d)
Short-URL: https://at-sushi.com:443/pukiwiki/index.php?cmd=s&k=de619b1bed
ISBN10
ISBN13
9784061426061