Skip to content

Commit 9439cf6

Browse files
author
Richard Jones
committed
flup setup docs from Christian Glass
1 parent 62a1fee commit 9439cf6

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

doc/acknowledgements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Martin Geisler,
4242
Ajit George,
4343
Frank Gibbons,
4444
Johannes Gijsbers,
45+
Christian Glass,
4546
Gus Gollings,
4647
Philipp Gortan,
4748
Dan Grassi,

doc/installation.txt

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,11 @@ Configure a Web Interface
326326
There are five web interfaces to choose from:
327327

328328
1. `web server cgi-bin`_
329-
2. `stand-alone web server`_
330-
3. `Zope product - ZRoundup`_
331-
4. `Apache HTTP Server with mod_python`_
332-
5. `WSGI handler`_
329+
2. `cgi-bin for limited-access hosting`_
330+
3. `stand-alone web server`_
331+
4. `Zope product - ZRoundup`_
332+
5. `Apache HTTP Server with mod_python`_
333+
6. `WSGI handler`_
333334

334335
You may need to give the web server user permission to access the tracker home
335336
- see the `UNIX environment steps`_ for information. You may also need to
@@ -387,6 +388,48 @@ couple lines to your Apache configuration::
387388
</Location>
388389

389390

391+
CGI-bin for Limited-Access Hosting
392+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393+
394+
If you are running in a shared-hosting environment or otherwise don't have
395+
permissiong to edit the system web server's configuration, but can create a
396+
``.htaccess`` file then you may be able to use this approach.
397+
398+
1. Install flup_
399+
2. Create a script ``roundup_stub`` in your server's ``cgi-bin`` directory
400+
containing::
401+
402+
#!/usr/bin/env python
403+
404+
# if necessary modify the Python path to include the place you
405+
# installed Roundup
406+
#import sys
407+
#sys.path.append('...')
408+
409+
# cgitb is needed for debugging in browser only
410+
#import cgitb
411+
#cgitb.enable()
412+
413+
# obtain the WSGI request dispatcher
414+
from roundup.cgi.wsgi_handler import RequestDispatcher
415+
tracker_home = '/path/to/tracker/home'
416+
app = RequestDispatcher(tracker_home)
417+
418+
from flup.server.cgi import WSGIServer
419+
WSGIServer(app).run()
420+
421+
3. Modify or created the ``.htaccess`` file in the desired (sub-)domain
422+
directory to contain::
423+
424+
RewriteEngine On
425+
RewriteBase /
426+
RewriteRule ^(.*)$ /cgi-bin/roundup_stub/$1 [L]
427+
428+
Now loading the (sub-)domain in a browser should load the tracker web
429+
interface. If you get a "500" error then enable the "cgitb" lines in the
430+
stub to get some debugging information.
431+
432+
390433
Stand-alone Web Server
391434
~~~~~~~~~~~~~~~~~~~~~~
392435

@@ -1034,6 +1077,7 @@ from installation and scripts.
10341077
.. _External hyperlink targets:
10351078

10361079
.. _apache: http://httpd.apache.org/
1080+
.. _flup: http://pypi.python.org/pypi/flup
10371081
.. _mod_python: http://www.modpython.org/
10381082
.. _MySQLdb: http://sourceforge.net/projects/mysql-python
10391083
.. _Psycopg: http://initd.org/software/initd/psycopg

0 commit comments

Comments
 (0)