Contents
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.
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:
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:
Please also consider how many threads are appropriate to be used in your deployment.
If you run the TurboGears/CherryPy server behind a proxy, you also might want to read the following:
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 Unix like system 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. Some examples for init scripts have been contributed to this documentation.
We also recommend using the Supervisor system for starting your TurboGears application since it has some additional advantages and features.