~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/user-guide/http_smart_server.txt

  • Committer: Martin Pool
  • Date: 2009-03-24 05:21:02 UTC
  • mfrom: (4192 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4202.
  • Revision ID: mbp@sourcefrog.net-20090324052102-8kk087b32tep3d9h
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    from bzrlib.transport.http import wsgi
133
133
 
134
134
    smart_server_app = wsgi.make_app(
135
 
        root='/srv/example.com/code',
 
135
        root='/srv/example.com/www/code',
136
136
        prefix='/code/',
137
137
        path_var='REQUEST_URI',
138
 
        readonly=True)
 
138
        readonly=True,
 
139
        load_plugins=True, 
 
140
        enable_logging=True)
139
141
 
140
142
    fcgi.WSGIServer(smart_server_app).run()
141
143
        
156
158
    from bzrlib.transport.http import wsgi
157
159
 
158
160
    smart_server_app = wsgi.make_app(
159
 
        root='/srv/example.com/code',
 
161
        root='/srv/example.com/www/code',
160
162
        prefix='/code/',
161
163
        path_var='REQUEST_URI',
162
 
        readonly=True)
 
164
        readonly=True,
 
165
        load_plugins=True, 
 
166
        enable_logging=True)
163
167
 
164
168
    def handler(request):
165
169
        """Handle a single request."""
166
170
        wsgi_server = modpywsgi.WSGIServer(smart_server_app)
167
171
        return wsgi_server.run(request)
168
172
        
169
 
The `modpywsgi` module can be found at http://trac.pocoo.org/wiki/ModPyWsgi.  It
170
 
is part of pocoo_.
171
 
You sould make sure you place modpywsgi.py in the same directory as
172
 
bzr-smart.py (ie. /srv/example.com/scripts/).
 
173
The `modpywsgi` module can be found at
 
174
http://dev.pocoo.org/projects/pocoo/browser/pocoo/wrappers/modpy.py. It is
 
175
part of pocoo_. You sould make sure you place modpywsgi.py in the same
 
176
directory as bzr-smart.py (ie. /srv/example.com/scripts/).
173
177
 
174
 
.. _pocoo: http://trac.pocoo.org/wiki/
 
178
.. _pocoo: http://dev.pocoo.org/projects/pocoo/
175
179
 
176
180
Clients
177
181
-------