Show More
@@ -443,8 +443,8 in the production.ini file:: | |||
|
443 | 443 | In order to not have the statics served by the application. This improves speed. |
|
444 | 444 | |
|
445 | 445 | |
|
446 | Apache virtual host example | |
|
447 | --------------------------- | |
|
446 | Apache virtual host reverse proxy example | |
|
447 | ----------------------------------------- | |
|
448 | 448 | |
|
449 | 449 | Here is a sample configuration file for apache using proxy:: |
|
450 | 450 | |
@@ -503,6 +503,31 then change <someprefix> into your choos | |||
|
503 | 503 | Apache's WSGI config |
|
504 | 504 | -------------------- |
|
505 | 505 | |
|
506 | Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For | |
|
507 | that, you'll need to: | |
|
508 | ||
|
509 | - Install mod_wsgi. If using a Debian-based distro, you can install | |
|
510 | the package libapache2-mod-wsgi:: | |
|
511 | ||
|
512 | aptitude install libapache2-mod-wsgi | |
|
513 | ||
|
514 | - Enable mod_wsgi:: | |
|
515 | ||
|
516 | a2enmod wsgi | |
|
517 | ||
|
518 | - Create a wsgi dispatch script, like the one below. Make sure you | |
|
519 | check the paths correctly point to where you installed RhodeCode | |
|
520 | and its Python Virtual Environment. | |
|
521 | - Enable the WSGIScriptAlias directive for the wsgi dispatch script, | |
|
522 | as in the following example. Once again, check the paths are | |
|
523 | correctly specified. | |
|
524 | ||
|
525 | Here is a sample excerpt from an Apache Virtual Host configuration file:: | |
|
526 | ||
|
527 | WSGIDaemonProcess pylons user=www-data group=www-data processes=1 \ | |
|
528 | threads=4 \ | |
|
529 | python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages | |
|
530 | WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi | |
|
506 | 531 |
|
|
507 | 532 | Example wsgi dispatch script:: |
|
508 | 533 | |
@@ -512,6 +537,9 Example wsgi dispatch script:: | |||
|
512 | 537 | |
|
513 | 538 | # sometimes it's needed to set the curent dir |
|
514 | 539 | os.chdir('/home/web/rhodecode/') |
|
540 | ||
|
541 | import site | |
|
542 | site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages") | |
|
515 | 543 | |
|
516 | 544 | from paste.deploy import loadapp |
|
517 | 545 | from paste.script.util.logging_config import fileConfig |
@@ -519,6 +547,10 Example wsgi dispatch script:: | |||
|
519 | 547 | fileConfig('/home/web/rhodecode/production.ini') |
|
520 | 548 | application = loadapp('config:/home/web/rhodecode/production.ini') |
|
521 | 549 | |
|
550 | Note: when using mod_wsgi you'll need to install the same version of | |
|
551 | Mercurial that's inside RhodeCode's virtualenv also on the system's Python | |
|
552 | environment. | |
|
553 | ||
|
522 | 554 | |
|
523 | 555 | Other configuration files |
|
524 | 556 | ------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now