Changes between Version 3 and Version 4 of TracModPython


Ignore:
Timestamp:
Dec 31, 2005, 5:43:42 PM (18 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v3 v4  
    1 = Trac and mod_python =
     1= Trac mod_python =
    22
    3 Trac supports [http://www.modpython.org/ mod_python], which speeds up Trac's response times considerably and permits use of many Apache features not possible with [wiki:TracStandalone tracd]/mod_proxy.
     3Trac では [http://www.modpython.org/ mod_python] をサポートします。 [http://www.modpython.org/ mod_python] は Trac のレスポンスタイムを飛躍的に向上し、 [wiki:TracStandalone tracd]/mod_proxy では使用できない多くの Apache 機能を使えるようにします。
    44
    5 == Simple configuration ==
     5== シンプルなコンフィグレーション ==
    66
    7 If you just installed mod_python, you may have to add a line to load the module in the Apache configuration:
     7もし mod_python をインストールしたならば、 Apache の設定ファイルに以下の一行を追加してモジュールをロードしなければなりません:
    88{{{
    99LoadModule python_module modules/mod_python.so
    1010}}}
    1111
    12 A simple setup of Trac on mod_python looks like this:
     12mod_python を使用した簡単な Trac のセットアップ方法は以下のようになります:
    1313{{{
    1414<Location /projects/myproject>
     
    2020}}}
    2121
    22 Note that the option `TracUriRoot` may or may not be necessary in your setup. Try without first, and if the URLs produced by Trac look wrong or if Trac does not seem to recognize the URLs correctly, add the `TracUriRoot` option.
     22`TracUriRoot` オプションは不要な場合もありますのでご注意ください。まずは `TracUriRoot` オプションを付けずに試し、 Trac が正しく URL を生成できないようであれば追加するようにしてください。
    2323
    24 Configuring authentication works the same as for [wiki:TracCgi#AddingAuthentication CGI]:
     24認証設定は [wiki:TracCgi#認証を追加する CGI] と同じです:
    2525{{{
    2626<Location "/projects/myproject/login">
     
    3232}}}
    3333
    34 If the Trac installation isn't installed in your Python path, you'll have to tell Apache where to find the Trac mod_python handler  using the `PythonPath` directive:
     34もし Trac のインストールが、通常の Python ライブラリのパスの中に無い場合、 Apache が Trac の mod_python ハンドルを見つけられるように `PythonPath` ディレクティブで指定しなければなりません:
    3535{{{
    3636<Location /projects/myproject>
     
    4242
    4343
    44 == Setting up multiple projects ==
     44== マルチプロジェクトのセットアップ ==
    4545
    46 The Trac mod_python handler handler supports a configuration option similar to Subversion's `SvnParentPath`, called `TracEnvParentDir`:
     46Trac の mod_python ハンドラは Subversion の `SvnParentPath` とよく似た `TracEnvParentDir` というコンフィグレーションオプションをサポートしています。
    4747{{{
    4848<Location /projects>
     
    5454}}}
    5555
    56 When you request the `/projects` URL, you will get a listing of all subdirectories of the directory you set as `TracEnvParentDir`. Selecting any project in the list will bring you to the corresponding Trac environment.
     56`/projects` の URL をリクエストすると、 `TracEnvParentDir` として設定したディレクトリ配下のサブディレクトリ一覧が表示されます。その一覧から何かプロジェクトを選択するとそれに該当する TracEnvironment を開くことができます。
    5757
    58 If you don't want to have the subdirectory listing as your projects home page you can use a
     58あなたのプロジェクトのホームページとして、サブディレクトリのリストが必要ないならば、以下のようにすることができます。
    5959{{{
    6060<LocationMatch "/.+/">
    6161}}}
    6262
    63 This will instruct Apache to use mod_python for all locations different from root while having the possibility of placing a custom home page for root in your !DocumentRoot folder.
     63これは Apache に mod_python を使用するために !DocumentRoot フォルダの代わりのロケーションを使用することを教えます。
    6464
    65 You can also use the same authentication realm for all of the projects using a `<LocationMatch>` directive:
     65すべてのプロジェクトに対して、 `<LocationMatch>` ディレクティブを使用することによって同じ認証の仕組みを使用することができます。
    6666{{{
    6767<LocationMatch "/[^/]+/login">
     
    7373}}}
    7474
    75 == Virtual Host Configuration ==
     75== 仮想ホストの設定 ==
    7676
    77 Below is the sample configuration required to set up your trac as a virtual server (i.e. when you access it at the URLs like
    78 !http://trac.mycompany.com):
     77以下に示す例は Trac を仮想サーバーとしてセットアップするときに必要な設定です。 ( 例えば、!http://trac.mycompany.com といった
     78URL でアクセスすることができます):
    7979
    8080{{{
     
    9797}}}
    9898
    99 == Troubleshooting ==
     99== トラブルシューティング ==
    100100
    101 === Form submission problems ===
     101=== フォームを送信するときの問題 ===
    102102
    103 If you're experiencing problems submitting some of the forms in Trac (a common problem is that you get redirected to the start page after submission), check whether your {{{DocumentRoot}}} contains a folder or file with the same path that you mapped the mod_python handler to. For some reason, mod_python gets confused when it is mapped to a location that also matches a static resource.
     103もし、 Trac のなかの何かしらのフォームを送信したときに、トラブルに見舞われたら(一般的な問題として、送信後にスタートページにリダイレクトされてしまうという問題があります)、あなたが指定した {{{DocumentRoot}}} と mod_python がマッピングしたのと同じフォルダやファイルを指しているかどうか確認してください。いくつかの理由のために、 mod_python は静的なリソースがマッピングされているのを嫌います。
    104104
    105 === Using .htaccess ===
     105=== .htaccess ファイルを使用する ===
    106106
    107 Although it may seem trivial to rewrite the above configuration as a directory in your document root with a `.htaccess` file, this does not work. Apache will append a "/" to any Trac URLs, which interferes with its correct operation.
     107ディレクトリの設定をほんのちょっと修正するには `.htaccess` ファイルを使用すればいいかもしれませんが、これは動作しません。 Apache が Trac URL に "/" (スラッシュ) を追加すると、正しい動作を妨げてしまいます。
    108108
    109 It may be possible to work around this with mod_rewrite, but I failed to get this working. In all, it is more hassle than it is worth. Stick to the provided instructions. :)
     109それでは、 mod_rewrite を使用すればいいように見えますが、これも動作しません。とにかく、百害あって一理なしです。指示に従ってください。:)
    110110
    111 === Win32 Issues ===
     111=== Win32 での特記 ===
    112112
    113 If you run trac with mod_python (3.1.3 or 3.1.4) on Windows,
    114 uploading attachments will '''not''' work.
    115 This is a known problem which we can't solve cleanly at the Trac level.
     113もし、 Windows 上で mod_python (3.1.3 または 3.1.4) を使用して Trac を起動しているならば、
     114添付ファイルのアップロードがたぶん動作 '''しない''' でしょう。
     115これは、既知の問題で、 Trac のレベルではきれいに解決できません。
    116116
    117 However, there is a workaround for this at the mod_python level,
    118 which is to apply the following patch [http://projects.edgewall.com/trac/attachment/ticket/554/util_py.patch attachment:ticket:554:util_py.patch]
    119 to the (Lib/site-packages)/modpython/util.py file.
     117とはいうものの、 mod_python レベルでの解決方法があります。
     118パッチ [http://projects.edgewall.com/trac/attachment/ticket/554/util_py.patch attachment:ticket:554:util_py.patch] を
     119(Lib/site-packages)/modpython/util.py ファイルに適用して下さい。
    120120
    121 If you don't have the `patch` command, that file can be replaced with the [http://svn.apache.org/viewcvs.cgi/httpd/mod_python/trunk/lib/python/mod_python/util.py?rev=103562&view=markup  fixed util.py] (fix which, although done prior to the 3.1.4 release, is ''not''
    122 present in 3.1.4).
     121もし、 `patch` コマンドを持っていないならば、ファイルを [http://svn.apache.org/viewcvs.cgi/httpd/mod_python/trunk/lib/python/mod_python/util.py?rev=103562&view=markup 修正済みの util.py]に置き換えることもできます。 (mod_python 3.1.4 リリース以前に書かれたものですが、事象が修正されます
     122現在の 3.1.4 ''ではありません'')。
    123123
    124 === OS X issues ===
     124=== OS X での特記 ===
    125125
    126 When using mod_python on OS X you will not be able to restart Apache using `apachectl restart`. This is apparently fixed in mod_python 3.2, but there's also a patch available for earlier versions [http://www.dscpl.com.au/projects/vampire/patches.html here].
     126OS X で mod_python を使用するとき、 `apachectl restart` コマンドで Apache の再起動ができないでしょう。これは、 mod_python 3.2 でおそらく修正されるでしょう。しかし、 [http://www.dscpl.com.au/projects/vampire/patches.html ここ] にあるパッチを適用すれば、 3.2 以前のバージョンでもこの問題を回避できます。
    127127
    128128----
    129 See also TracGuide, TracInstall, TracCgi, TracFastCgi
     129See also: TracGuide, TracInstall, TracCgi, TracFastCgi