17
17
Python 2.2.1 or later. Earlier versions of Python will not work.
19
Apache 2.0.40 or later (For Apache 1.3.x, use mod_python version 2.7.x).
19
Apache 2.0.47 or later (For Apache 1.3.x, use mod_python version 2.7.x).
22
22
In order to compile mod_python you will need to have the include files
101
101
%$ keep emacs happy
104
\index{./configure!\longprogramopt{with-mutex-dir}}
105
%\indexii{./configure}{\longprogramopt{with-mutex-dir}}
106
Sets the directory for the apache mutex locks. The default is
107
\filenq{/tmp}. The directory must exist and be writable by the
108
owner of the apache process.
110
Use \longprogramopt{with-mutex-dir} option, e.g:
113
$ ./configure --with-mutex-dir=/var/run/mod_python
116
The mutex directory can also be specified in using a
117
\citetitle[dir-other-po.html]{PythonOption} directive.
118
See \citetitle[inst-apacheconfig.html]{Configuring Apache}.
120
\emph{Back ported from version 3.3.0}
104
123
\index{./configure!\longprogramopt{with-max-locks}}
105
%\indexii{./configure}{\longprogramopt{with-max-locks}}
106
124
Sets the maximum number of locks reserved by mod_python.
108
126
The mutexes used for locking are a limited resource on some
225
247
\subsection{Configuring Apache\label{inst-apacheconfig}}
251
\item \strong{LoadModule} \indexii{LoadModule}{apache configuration}
230
253
If you compiled mod_python as a DSO, you will need to tell Apache to
231
254
load the module by adding the following line in the Apache
232
255
configuration file, usually called \filenq{httpd.conf} or
241
264
should report at the very end exactly where \program{mod_python.so}
242
265
was placed and how the \code{LoadModule} directive should appear.
267
\item \strong{Mutex Directory} \indexii{mutex directory}{apache configuration}
269
The default directory for mutex lock files is \filenq{/tmp}. The
270
default value can be be specified at compile time using
271
\citetitle[inst-configure.html]{./configure ----with-mutex-dir}.
273
Alternatively this value can be overriden at apache startup using
274
a \citetitle[dir-other-po.html]{PythonOption}.
277
PythonOption mod_python.mutex_directory "/tmp"
280
This may only be used in the server configuration context.
281
It will be ignored if used in a directory, virtual host,
282
htaccess or location context. The most logical place for this
283
directive in your apache configuration file is immediately
284
following the \strong{LoadModule} directive.
286
\emph{Back ported from version 3.3.0}
288
\item \strong{Mutex Locks} \indexii{apache configuration}{mutex locks}
290
Mutexes are used in mod_python for session locking. The default
293
On some systems the locking mechanism chosen uses valuable
294
system resources. Notably on RH 8 sysv ipc is used, which
295
by default provides only 128 semaphores system-wide.
296
On many other systems flock is used which may result in a relatively
297
large number of open files.
299
The optimal number of necessary locks is not clear.
300
Increasing the maximum number of locks may increase performance
301
when using session locking. A reasonable number for
302
higher performance might be 32.
304
The maximum number of locks can be specified at compile time
305
using \citetitle[inst-configure.html]{./configure ----with-max-locks}.
307
Alternatively this value can be overriden at apache startup using
308
a \citetitle[dir-other-po.html]{PythonOption}.
311
PythonOption mod_python.mutex_locks 8
314
This may only be used in the server configuration context.
315
It will be ignored if used in a directory, virtual host,
316
htaccess or location context. The most logical place for this
317
directive in your apache configuration file is immediately
318
following the \strong{LoadModule} directive.
320
\emph{Back ported from version 3.3.0}
246
324
\section{Testing\label{inst-testing}}