Deploying TurboGears
| Status: | Draft |
|---|
Where to Deploy
Python isn't as widely available on commodity hosting as other environments (read PHP) are. If you don't have your own server, take a look at our list of hosting companies for top picks.
Installation
Before you configure your server, you need to install your application on the target server. To make this easy for yourself and others, you should use Python eggs:
Normally, you don't have root access on rented hosting space. Here are some ways to install TurboGears into your home directory:
Configuration
There are many ways to run a TurboGears application. Before deployment, make sure you go over the Runtime Configuration to setup your application for maximum performance.
Next, you should decide how to deploy your application. Here are a few sample configurations. If it all possible, we recommend using either a setup with mod_wsgi or a reverse proxy, since these are most easy to set up, widely-used and proven configurations:
- Deploying TurboGears Using mod_wsgi
- Deploying TurboGears Using Apache as a Reverse Proxy
- Deploying TurboGears Using Nginx as a Reverse Proxy
- Deploying TurboGears Using Apache and mod_python
- Deploying TurboGears Using LightTPD
- Deploying TurboGears Using IIS
- Running TurboGears as a Windows Service
- Integrated Windows Authentication
- Distributing TurboGears as a Standalone Windows Application: tg2exe
If you run the TurboGears/CherryPy server behind a proxy, you also might want to read the following:
Integrating with the init system on Un*x (SysV style)
If want to use TurboGears standalone (or behind a proxy like Apache's mod_proxy), you need to make sure that the TurboGears server is started automatically. On Un*x you can treat your app like every other system daemon by adding a custom init script which starts the server automatically when your system boots. This wiki contains a contributed page where you can find examples for init scripts.