Show More
@@ -443,8 +443,8 b' in the production.ini file::' | |||||
443 | In order to not have the statics served by the application. This improves speed. |
|
443 | In order to not have the statics served by the application. This improves speed. | |
444 |
|
444 | |||
445 |
|
445 | |||
446 | Apache virtual host example |
|
446 | Apache virtual host reverse proxy example | |
447 | --------------------------- |
|
447 | ----------------------------------------- | |
448 |
|
448 | |||
449 | Here is a sample configuration file for apache using proxy:: |
|
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 | Apache's WSGI config |
|
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 | Example wsgi dispatch script:: |
|
528 | Example wsgi dispatch script:: | |
508 |
|
529 | |||
@@ -512,6 +533,9 b' Example wsgi dispatch script::' | |||||
512 |
|
533 | |||
513 | # sometimes it's needed to set the curent dir |
|
534 | # sometimes it's needed to set the curent dir | |
514 | os.chdir('/home/web/rhodecode/') |
|
535 | os.chdir('/home/web/rhodecode/') | |
|
536 | ||||
|
537 | import site | |||
|
538 | site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages") | |||
515 |
|
539 | |||
516 | from paste.deploy import loadapp |
|
540 | from paste.deploy import loadapp | |
517 | from paste.script.util.logging_config import fileConfig |
|
541 | from paste.script.util.logging_config import fileConfig | |
@@ -519,6 +543,10 b' Example wsgi dispatch script::' | |||||
519 | fileConfig('/home/web/rhodecode/production.ini') |
|
543 | fileConfig('/home/web/rhodecode/production.ini') | |
520 | application = loadapp('config:/home/web/rhodecode/production.ini') |
|
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 | Other configuration files |
|
551 | Other configuration files | |
524 | ------------------------- |
|
552 | ------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now