1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# XXX = Spyce program directory
# This section asks your web server to serve the
# Spyce documentation from http://localhost/spyce/.
Alias /spyce/ "XXX/docs/"
<Directory "XXX/docs">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
###################
# Spyce via cgi or fcgi
# This section is the default. It provides a default
# mechanism to process .spy files. On a vanilla Apache
# installation this will be done via CGI, which is
# quite slow. If the FastCGI module is properly
# installed, should automatically be used instead.
AddHandler spyce-cgi-handler spy
Action spyce-cgi-handler "/spyce-cgi/run_spyceCGI.py"
ScriptAlias /spyce-cgi/ "XXX/"
<Location /spyce-cgi/>
<IfModule mod_fastcgi.c>
# If mod_fastcgi not installed, we get plain cgi
SetHandler fastcgi-script
</IfModule>
</Location>
# If FastCGI is installed, it will be picked up
# automatically. On Linux, you can also omit this section
# and use a dynamic fcgi server instead.
<IfModule mod_fastcgi.c>
FastCgiServer "XXX/run_spyceCGI.py" -port 7654 -initial-env FCGI_PORT=7654
</IfModule>
# On Windows ONLY, please uncomment the following line.
# ScriptInterpreterSource registry
###################
# Spyce via mod_python
# This section allows Spyce to be invoked via the mod_python,
# yet another alternative with decent performance. Comment
# the CGI/FastCGI section above entirely, and uncomment the
# following lines, if you choose to use this instead.
# (Note that the doubly commented lines, can remain commented
# depending on your configuration).
#<IfModule mod_python.c>
# AddHandler python-program .spy
# PythonHandler run_spyceModpy::spyceMain
# PythonPath "sys.path+[r'XXX']"
# #PythonOption SPYCE_CONFIG "/mydir/spyce.conf"
# #PythonOptimize On
#</IfModule>
###################
# Spyce via proxy (on port 8000)
# This section direct Apache to process Spyce requests via
# a Spyce proxy server. Comment the CGI/FastCGI section above,
# and uncomment the following lines.
# NB: Remember to start the Spyce proxy server...
# spyce -l -p 8000 /document_root
# If you would like to run your server on another port,
# start the proxy on that port (using the -p switch)
# and change the RewriteRule below accordingly.
#<IfModule mod_rewrite.c>
# RewriteEngine On
# RewriteRule ^(.*\.spy) http://localhost:8000$1 [p]
#</IfModule>
|