Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 5 and Version 6 of TurboGearsOnSharedHostingAccount


Ignore:
Timestamp:
04/29/06 13:23:49 (13 years ago)
Author:
roger.demetrescu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TurboGearsOnSharedHostingAccount

    v5 v6  
    1 The HOWTO describes how to install TurboGears app on a shared hosting account, whereas Apache forwards HTTP requests to the CherryPy server and installation files is sandboxed to user's homedir (vs. usual system-wide setup). 
    2  
    3 ''it's a bit lengthy, probably need to be trimmed'' 
    4  
    5 == !CherryPy configuration == 
    6  
    7 To configure Apache/Cherrypy read [http://www.cherrypy.org/wiki/BehindApache this]. You'll need a port assigned to you by hoster to forward requests to. 
    8  
    9 == Prepare non-root python environment == 
    10  
    11 This is easy with Ian Bicking's script: 
    12  
    131{{{ 
    14 $ wget http://svn.colorstudy.com/home/ianb/non_root_python.py 
    15 $ python2.4 non_root_python.py 
     2#!html 
     3<br> 
     4<div style="display:block; padding: 4px; border: 2px solid red; color: #C00; font-weight:bold;"> 
     5Note: this entry was moved to TurboGears newsdoc (TurboGearsOnSharedHostingAccount.html) 
     6</div> 
     7<br> 
    168}}} 
    17  
    18 This copies system Python2.4 files to your ~/bin, ~/lib/python2.4 and ~/include directories. The "non-root" python executable will reside in ~/bin. 
    19  
    20 == Install TurboGears itself == 
    21  
    22 {{{ 
    23 $ svn co http://www.turbogears.org/svn/turbogears/branches/1.0 turbogears 
    24 $ cd turbogears 
    25 $ ~/bin/python setup.py install 
    26 }}} 
    27  
    28 Note that I also had to installKid and Cheetah from SVN; this is currently required for TG to operate properly. To verify the install try to run ~/bin/tg-admin command. 
    29  
    30 == Install Turbogears application == 
    31  
    32 Next step is to install your application. If you're using an egg (and I think there is no valid reason you shouldn't) it's simply a matter of running `~/bin/easy_install -s ~/bin TheApp-1.0.egg`. Btw, to build an egg just run `setup.py bdist_egg` from within your development copy. 
    33  
    34 == Configure the application == 
    35  
    36 This is a matter of writing proper prod.cfg and putting it to correct place. 
    37  
    38 The settings to pay attention to are: `sqlobject.dburi`, server.socket_port and server.log_file. In a shared hosting setup, the socket_port and log directory to use are given by the hoster so just make sure you've specified them correctly. 
    39  
    40 When running proxied behind Apache you will also need to add the following to the setup: 
    41  
    42 {{{ 
    43 [/] 
    44 base_url_filter.on = True 
    45 base_url_filter.use_x_forward_host = True 
    46 }}} 
    47  
    48 This ensures !CherryPy will use "X-Forwarded-Host" header set by Apache to figure out publicly-visible address of the application. 
    49  
    50 == References == 
    51  
    52   * ApacheIntegration 
    53   * DeployWithAnEgg  
    54   * http://www.cherrypy.org/wiki/BehindApache 
    55