ドキュメントルート変更 XAMPP

2010 年 5 月 27 日 木曜日  【 カテゴリー: 開発環境構築


開発するうえで、ドキュメントルートとなるディレクトリの階層を深くしたくない、開発データはXAMPPディレクトリから分けたいなどと思ったので今回はドキュメントルートを変更します。


C:/Program Files/xampp/ にインストールしたことを前提に書いてます。

「apache/conf/ httpd.conf」の変更

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "C:/Program Files/xampp/htdocs"
DocumentRoot "新ドキュメントルートパス"

「C:\Program Files\xampp\apache\conf\httpd.conf」を開きます。
187行目の「DocumentRoot」を変更します。

xampp10

「アクセス権限がありません」と権限エラーになりました。

#<Directory "C:/Program Files/xampp/htdocs">
<Directory "新ドキュメントルートパス">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
          略
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
</Directory>

217行目からのドキュメントルートの権限などを設定いる箇所があります。
ディレクトリの対象を新ドキュメントルートに変更します。

以上でドキュメントルートが変更できました。

xampp11

しかし、このままでは「xampp Control Panel」でのAdminボタンがリンク切れ起こしてしまいます。コントロールパネルからのリンク切れの修正についてはまた調べて記事にしたいと思います。

タグ:


にほんブログ村 IT技術ブログ Webサイト構築へ
にほんブログ村
【WEBサイト構築・プログラムブログ】
ランキング参加中!よろしければ「クリック」お願いします。
にほんブログ村 IT技術ブログ プログラム・プログラマへ
にほんブログ村
2010 年 5 月 27 日 木曜日  【 カテゴリー: 開発環境構築

コメントをどうぞ

※管理者による確認後に表示されます。表示までしばらくお待ちください。