Changes between Version 3 and Version 4 of TracModPython
- Timestamp:
- Dec 31, 2005, 5:43:42 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracModPython
v3 v4 1 = Trac andmod_python =1 = Trac と mod_python = 2 2 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.3 Trac では [http://www.modpython.org/ mod_python] をサポートします。 [http://www.modpython.org/ mod_python] は Trac のレスポンスタイムを飛躍的に向上し、 [wiki:TracStandalone tracd]/mod_proxy では使用できない多くの Apache 機能を使えるようにします。 4 4 5 == Simple configuration==5 == シンプルなコンフィグレーション == 6 6 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 の設定ファイルに以下の一行を追加してモジュールをロードしなければなりません: 8 8 {{{ 9 9 LoadModule python_module modules/mod_python.so 10 10 }}} 11 11 12 A simple setup of Trac on mod_python looks like this:12 mod_python を使用した簡単な Trac のセットアップ方法は以下のようになります: 13 13 {{{ 14 14 <Location /projects/myproject> … … 20 20 }}} 21 21 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 を生成できないようであれば追加するようにしてください。 23 23 24 Configuring authentication works the same as for [wiki:TracCgi#AddingAuthentication CGI]:24 認証設定は [wiki:TracCgi#認証を追加する CGI] と同じです: 25 25 {{{ 26 26 <Location "/projects/myproject/login"> … … 32 32 }}} 33 33 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` ディレクティブで指定しなければなりません: 35 35 {{{ 36 36 <Location /projects/myproject> … … 42 42 43 43 44 == Setting up multiple projects==44 == マルチプロジェクトのセットアップ == 45 45 46 T he Trac mod_python handler handler supports a configuration option similar to Subversion's `SvnParentPath`, called `TracEnvParentDir`:46 Trac の mod_python ハンドラは Subversion の `SvnParentPath` とよく似た `TracEnvParentDir` というコンフィグレーションオプションをサポートしています。 47 47 {{{ 48 48 <Location /projects> … … 54 54 }}} 55 55 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 を開くことができます。 57 57 58 If you don't want to have the subdirectory listing as your projects home page you can use a 58 あなたのプロジェクトのホームページとして、サブディレクトリのリストが必要ないならば、以下のようにすることができます。 59 59 {{{ 60 60 <LocationMatch "/.+/"> 61 61 }}} 62 62 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 フォルダの代わりのロケーションを使用することを教えます。 64 64 65 You can also use the same authentication realm for all of the projects using a `<LocationMatch>` directive: 65 すべてのプロジェクトに対して、 `<LocationMatch>` ディレクティブを使用することによって同じ認証の仕組みを使用することができます。 66 66 {{{ 67 67 <LocationMatch "/[^/]+/login"> … … 73 73 }}} 74 74 75 == Virtual Host Configuration==75 == 仮想ホストの設定 == 76 76 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 といった 78 URL でアクセスすることができます): 79 79 80 80 {{{ … … 97 97 }}} 98 98 99 == Troubleshooting==99 == トラブルシューティング == 100 100 101 === Form submission problems===101 === フォームを送信するときの問題 === 102 102 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 は静的なリソースがマッピングされているのを嫌います。 104 104 105 === Using .htaccess===105 === .htaccess ファイルを使用する === 106 106 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 に "/" (スラッシュ) を追加すると、正しい動作を妨げてしまいます。 108 108 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 を使用すればいいように見えますが、これも動作しません。とにかく、百害あって一理なしです。指示に従ってください。:) 110 110 111 === Win32 Issues===111 === Win32 での特記 === 112 112 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 のレベルではきれいに解決できません。 116 116 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 ファイルに適用して下さい。 120 120 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 ''ではありません'')。 123 123 124 === OS X issues===124 === OS X での特記 === 125 125 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]. 126 OS X で mod_python を使用するとき、 `apachectl restart` コマンドで Apache の再起動ができないでしょう。これは、 mod_python 3.2 でおそらく修正されるでしょう。しかし、 [http://www.dscpl.com.au/projects/vampire/patches.html ここ] にあるパッチを適用すれば、 3.2 以前のバージョンでもこの問題を回避できます。 127 127 128 128 ---- 129 See also TracGuide, TracInstall, TracCgi, TracFastCgi129 See also: TracGuide, TracInstall, TracCgi, TracFastCgi