##// END OF EJS Templates
Improvements to mod_wsgi setup documentation.
Augusto Herrmann -
r1558:662173ba beta
parent child Browse files
Show More
@@ -443,8 +443,8 b' 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,27 b' 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 aptitude install libapache2-mod-wsgi
512 - Enable mod_wsgi::
513 a2enmod wsgi
514 - Create a wsgi dispatch script, like the one below. Make sure you
515 check the paths correctly point to where you installed RhodeCode
516 and its Python Virtual Environment.
517 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
518 as in the following example. Once again, check the paths are
519 correctly specified.
520
521 Here is a sample excerpt from an Apache Virtual Host configuration file::
522
523 WSGIDaemonProcess pylons user=www-data group=www-data processes=1 \
524 threads=4 \
525 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
526 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
506 527
507 528 Example wsgi dispatch script::
508 529
@@ -513,12 +534,19 b' Example wsgi dispatch script::'
513 534 # sometimes it's needed to set the curent dir
514 535 os.chdir('/home/web/rhodecode/')
515 536
537 import site
538 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
539
516 540 from paste.deploy import loadapp
517 541 from paste.script.util.logging_config import fileConfig
518 542
519 543 fileConfig('/home/web/rhodecode/production.ini')
520 544 application = loadapp('config:/home/web/rhodecode/production.ini')
521 545
546 Note: when using mod_wsgi you'll need to install the same version of
547 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
548 environment.
549
522 550
523 551 Other configuration files
524 552 -------------------------
General Comments 0
You need to be logged in to leave comments. Login now