Mercurial > p > roundup > code
comparison doc/installation.txt @ 2554:52944e87909c
added mod_python setup example
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Tue, 06 Jul 2004 11:33:57 +0000 |
| parents | 706031763266 |
| children | 6c096b4aea67 |
comparison
equal
deleted
inserted
replaced
| 2553:82f53c270e7c | 2554:52944e87909c |
|---|---|
| 315 There are three web interfaces to choose from: | 315 There are three web interfaces to choose from: |
| 316 | 316 |
| 317 1. `web server cgi-bin`_ | 317 1. `web server cgi-bin`_ |
| 318 2. `stand-alone web server`_ | 318 2. `stand-alone web server`_ |
| 319 3. `Zope product - ZRoundup`_ | 319 3. `Zope product - ZRoundup`_ |
| 320 4. `Apache HTTP Server with mod_python`_ | |
| 320 | 321 |
| 321 You may need to give the web server user permission to access the tracker home | 322 You may need to give the web server user permission to access the tracker home |
| 322 - see the `UNIX environment steps`_ for information. You may also need to | 323 - see the `UNIX environment steps`_ for information. You may also need to |
| 323 configure your system in some way - see `platform-specific notes`_. | 324 configure your system in some way - see `platform-specific notes`_. |
| 324 | 325 |
| 384 your Products directory either in INSTANCE_HOME/Products or the Zope | 385 your Products directory either in INSTANCE_HOME/Products or the Zope |
| 385 code tree lib/python/Products. | 386 code tree lib/python/Products. |
| 386 | 387 |
| 387 When you next (re)start up Zope, you will be able to add a ZRoundup object | 388 When you next (re)start up Zope, you will be able to add a ZRoundup object |
| 388 that interfaces to your new tracker. | 389 that interfaces to your new tracker. |
| 390 | |
| 391 Apache HTTP Server with mod_python | |
| 392 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 393 | |
| 394 `Mod_python`_ is an `Apache`_ module that embeds the Python interpreter | |
| 395 within the server. Running Roundup this way is much faster than all | |
| 396 above options and, like `web server cgi-bin`_, allows to use HTTPS | |
| 397 protocol. The drawback is that this setup is more complicated. | |
| 398 | |
| 399 The following instructions were tested on apache 2.0 with mod_python 3.1. | |
| 400 If you are using older versions, your mileage may vary. | |
| 401 | |
| 402 Mod_python uses OS threads. If your apache was built without threads | |
| 403 (quite commonly), you must load the threading library to run mod_python. | |
| 404 This is done by setting ``LD_PRELOAD`` to your threading library path | |
| 405 in apache ``envvars`` file. Example for gentoo linux (``envvars`` file | |
| 406 is located in ``/usr/lib/apache2/build/``):: | |
| 407 | |
| 408 LD_PRELOAD=/lib/libpthread.so.0 | |
| 409 export LD_PRELOAD | |
| 410 | |
| 411 Example for FreeBSD (``envvars`` is in ``/usr/local/sbin/``):: | |
| 412 | |
| 413 LD_PRELOAD=/usr/lib/libc_r.so | |
| 414 export LD_PRELOAD | |
| 415 | |
| 416 Next, you have to add Roundup trackers configuration to apache config. | |
| 417 In the following example we have two trackers set up in | |
| 418 ``/var/db/roundup/support`` and ``var/db/roundup/devel`` and accessed | |
| 419 as ``https://my.host/roundup/support/`` and ``https://my.host/roundup/devel/`` | |
| 420 respectively. Having them share same parent directory allows us to | |
| 421 reduce the number of configuration directives. | |
| 422 | |
| 423 Static files from ``html`` directory are served by apache itself - this | |
| 424 is quickier and generally more robust than doing that from python. | |
| 425 Everything else is aliased to dummy (non-existing) ``py`` file, | |
| 426 which is handled by mod_python and our roundup module. | |
| 427 | |
| 428 Example mod_python configuration:: | |
| 429 | |
| 430 ################################################# | |
| 431 # Roundup Issue tracker | |
| 432 ################################################# | |
| 433 # enable Python optimizations (like 'python -O') | |
| 434 PythonOptimize On | |
| 435 # let apache handle static files from 'html' directories | |
| 436 AliasMatch /roundup/(.+)/@@file/(.*) /var/db/roundup/$1/html/$2 | |
| 437 # everything else is handled by roundup web UI | |
| 438 AliasMatch /roundup/([^/]+)/(?!@@file/)(.*) /var/db/roundup/$1/dummy.py/$2 | |
| 439 # roundup requires a slash after tracker name - add it if missing | |
| 440 RedirectMatch permanent /roundup/([^/]+)$ /roundup/$1/ | |
| 441 # common settings for all roundup trackers | |
| 442 <Directory /var/db/roundup/*> | |
| 443 Order allow,deny | |
| 444 Allow from all | |
| 445 AllowOverride None | |
| 446 Options None | |
| 447 AddHandler python-program .py | |
| 448 PythonHandler roundup.cgi.apache | |
| 449 # uncomment the following line to see tracebacks in the browser | |
| 450 # (note that *some* tracebacks will be displayed anyway) | |
| 451 #PythonDebug On | |
| 452 </Directory> | |
| 453 # roundup tracker homes | |
| 454 <Directory /var/db/roundup/devel> | |
| 455 PythonOption TrackerHome /var/db/roundup/devel | |
| 456 </Directory> | |
| 457 <Directory /var/db/roundup/support> | |
| 458 PythonOption TrackerHome /var/db/roundup/support | |
| 459 </Directory> | |
| 389 | 460 |
| 390 | 461 |
| 391 Configure an Email Interface | 462 Configure an Email Interface |
| 392 ---------------------------- | 463 ---------------------------- |
| 393 | 464 |
| 648 .. _`Tracking different types of issues`: | 719 .. _`Tracking different types of issues`: |
| 649 customizing.html#tracking-different-types-of-issues | 720 customizing.html#tracking-different-types-of-issues |
| 650 .. _`customising roundup`: customizing.html | 721 .. _`customising roundup`: customizing.html |
| 651 .. _`upgrading document`: upgrading.html | 722 .. _`upgrading document`: upgrading.html |
| 652 .. _`administration guide`: admin_guide.html | 723 .. _`administration guide`: admin_guide.html |
| 724 | |
| 725 | |
| 726 .. _External hyperlink targets: | |
| 727 | |
| 728 .. _apache: http://httpd.apache.org/ | |
| 729 .. _metakit: http://www.equi4.com/metakit/ | |
| 730 .. _mod_python: http://www.modpython.org/ | |
| 731 .. _MySQLdb: http://sourceforge.net/projects/mysql-python | |
| 732 .. _Psycopg: http://initd.org/software/initd/psycopg | |
| 653 .. _pybsddb: http://pybsddb.sourceforge.net/ | 733 .. _pybsddb: http://pybsddb.sourceforge.net/ |
| 654 .. _pysqlite: http://pysqlite.sourceforge.net/ | 734 .. _pysqlite: http://pysqlite.sourceforge.net/ |
| 655 .. _metakit: http://www.equi4.com/metakit/ | |
| 656 .. _Psycopg: http://initd.org/software/initd/psycopg | |
| 657 .. _MySQLdb: http://sourceforge.net/projects/mysql-python | |
| 658 |
