.htaccess WSGIScriptAlias

826 views
Skip to first unread message

ehird

unread,
Oct 9, 2008, 1:30:10 PM10/9/08
to modwsgi
is there a reason WSGIScriptAlias can't go in .htaccess?

my server hosts a bunch of unrelated, and administrated-by-seperate-
people sites.

it'd be nice to be able to put it in .htaccess with all the other site-
specific conf.

thanks

Graham Dumpleton

unread,
Oct 9, 2008, 9:51:31 PM10/9/08
to mod...@googlegroups.com
2008/10/10 ehird <penguino...@googlemail.com>:

>
> is there a reason WSGIScriptAlias can't go in .htaccess?

Yes. Apache Alias/ScriptAlias directives and also WSGIScriptAlias
directive, are mapped by Apache even before a request has been mapped
to a physical file system directory. Thus including them in .htaccess
file would be way to late in Apache processing phases.

> my server hosts a bunch of unrelated, and administrated-by-seperate-
> people sites.
>
> it'd be nice to be able to put it in .htaccess with all the other site-
> specific conf.

In that case you need to use AddHandler directive. See AddHandler examples in:

http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive

Note that if these are separate users sites, you should not use
embedded mode and should use daemon mode instead. You still need to do
some configuration in main Apache configuration, as that is only place
that can defined daemon processes and delegate groups of applications
to them. But once set up, users need only add .wsgi files into their
directories to add new applications.

For daemon mode example see towards end of same document, plus towards
end of quick configuration guide:

http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Defining_Process_Groups
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process

So, have a look at that and post back what configuration you come up
with and I'll comment on whether it may need to be tweaked, or warn
you about any issues arising from it.

Graham

Reply all
Reply to author
Forward
0 new messages