~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
using Apache 2.0 and FastCGI or mod_python or mod_wsgi.
6
6
 
7
7
For more information on the smart server, and other ways to configure it
8
 
see the main `smart server documentation`_.
9
 
 
10
 
.. _smart server documentation: #running-a-smart-server
 
8
see the main `smart server documentation <server.html>`_.
11
9
 
12
10
Example
13
11
-------
49
47
        Options Indexes FollowSymLinks
50
48
        RewriteEngine On
51
49
        RewriteBase /code
52
 
        RewriteRule ^(.*/|)\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi
 
50
        RewriteRule ^(.*/)?\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi
53
51
    </Directory>
54
52
 
55
53
    # bzr-smart.fcgi isn't under the DocumentRoot, so Alias it into the URL
82
80
Define the rewrite rules with mod_rewrite the same way as for FastCGI, except
83
81
change::
84
82
 
85
 
    RewriteRule ^(.*/|)\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi
 
83
    RewriteRule ^(.*/)?\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi
86
84
 
87
85
to::
88
86
 
89
 
    RewriteRule ^(.*/|)\.bzr/smart$ /srv/example.com/scripts/bzr-smart.py
 
87
    RewriteRule ^(.*/)?\.bzr/smart$ /srv/example.com/scripts/bzr-smart.py
90
88
 
91
89
Like with mod_fastcgi, we also define how our script is to be handled::
92
90
 
260
258
.. _WSGI standard: http://www.python.org/dev/peps/pep-0333/
261
259
 
262
260
 
263
 
Pushing over the http smart server
 
261
Pushing over the HTTP smart server
264
262
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
265
263
 
266
 
It is possible to allow pushing data over the http smart server. The
 
264
It is possible to allow pushing data over the HTTP smart server. The
267
265
easiest way to do this, is to just supply ``readonly=False`` to the
268
266
``wsgi.make_app()`` call. But be careful, because the smart protocol does
269
267
not contain any Authentication. So if you enable write support, you will
280
278
    </Location>
281
279
 
282
280
At this time, it is not possible to allow some people to have read-only
283
 
access and others to have read-write access to the same urls. Because at
 
281
access and others to have read-write access to the same URLs. Because at
284
282
the HTTP layer (which is doing the Authenticating), everything is just a
285
283
POST request.  However, it would certainly be possible to have HTTPS
286
284
require authentication and use a writable server, and plain HTTP allow