Closed GoogleCodeExporter closed 9 years ago
Note, to avoid confusion, the WSGIReloadMechanism argument of 'Module' should
be changed to 'Script'. This
shouldn't be a big deal as that is the default value and so no one would
normally be setting it explicitly. In other
words the name change shouldn't be noticed. Thus two reload mechanisms would be
Script and Process, these
being the defaults for embedded mode and daemon mode respectively, albeit that
Process can only apply to
daemon mode anyway. As described above, for WSGIModuleAlias however, no ability
for anything to be reloaded
as no script file available to check for changes.
Original comment by Graham.Dumpleton@gmail.com
on 26 Mar 2008 at 10:29
To be consistent with other directives in mod_wsgi, should probably not follow
mod_python convention for designating the callable object name, instead should
use:
WSGIModuleAlias /trac trac.web.main callable-object=dispatch_request
If one allows options like this on WSGI Alias directives, then could also allow
application-group and process-group to be defined as well. Thus Trac,
configuration
would come down to:
WSGIDaemonProcess site-1 user=trac group=trac threads=25
WSGIModuleAlias /trac trac.web.main \
callable-object=dispatch_request \
process-group=site-1 application-group=%{GLOBAL}
<Location /trac>
SetEnv trac.env_path /usr/local/trac/site-1
</Location>
and:
WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
WSGIDaemonProcess site-2 user=user-2 group=user-2 threads=25
WSGIDaemonProcess site-3 user=user-3 group=user-3 threads=25
WSGIDaemonProcess site-4 user=user-4 group=user-4 threads=25
WSGIDaemonProcess site-5 user=user-5 group=user-5 threads=25
WSGIDaemonProcess site-6 user=user-6 group=user-6 threads=25
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/trac/([^/]+)
RewriteRule . - [E=trac.process_group:%1,\
E=trac.env_path:/usr/local/trac/sites/%1]
WSGIModuleAliasMatch ^/trac/([^/]+) trac.web.main \
callable-object=dispatch_request \
process-group=site-1 application-group=%{GLOBAL}
There is no way to set WSGI environment variables through an option and not
sure I
want to go that direction, so Location directive or rewrite rule still required
as shown.
If go this way of using options for process-group, application-group and
callable-object, could also logically allow them for WSGIScriptAlias directives
as well.
As to module as target, could also introduce module variants of other
directives such
as WSGIAuthUserModule, WSGIAuthGroupModule, WSGIAccessModule and
WSGIImportModule.
Original comment by Graham.Dumpleton@gmail.com
on 26 Mar 2008 at 11:23
Original comment by Graham.Dumpleton@gmail.com
on 7 Jul 2008 at 2:25
Original comment by Graham.Dumpleton@gmail.com
on 7 Jul 2008 at 2:32
Splitting out the addition of process-group, application-group, callable-object
and pass-authorisation options
to WSGIScriptAlias directives as separate issue.
The original intent of having 'Module' variants of WSGIScriptAlias directives
may not be feasible as in order to get
SCRIPT_NAME to be set correctly requires overriding special translate phase of
Apache as well as various other
tricks. May not be worth the trouble.
Original comment by Graham.Dumpleton@gmail.com
on 12 Jul 2008 at 1:12
Decided that will not create module variants of directives.
Original comment by Graham.Dumpleton@gmail.com
on 29 Oct 2008 at 10:51
Original issue reported on code.google.com by
Graham.Dumpleton@gmail.com
on 26 Mar 2008 at 10:13