Python – mod_wsgi with no access to apache config

.htaccessapache-2.2mod-wsgipythonshared-hosting

Provided that on the server I have:

  • mod_wsgi loaded and enabled
  • all-powerful htaccess,

can I use mod_wsgi without the need to edit the global apache config files? I don't have administrative privileges on the server.

With modpython is was possible to do everything from the root folder's htaccess.

If the answer is no, as the QuickConfigurationGuide seems to suggest, what is the best thing I can ask to my system administrator to do so that they can edit the configuration once and never talk to me again? Consider a multi-user system such as what you find in shared hosting or a University's user pages, for example.

I'm trying to deploy a framework like django, cherry py or web.py, but I don't think that should make a difference.

Best Answer

Read:

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

You can use AddHandler for wsgi-script.

That alone is as dangerous as it was in mod_python because you are running stuff in the main Apache child worker processes and any system administrator who has any level of paranoia shouldn't allow that on a shared system.

The system administrator should at least set up a mod_wsgi daemon process group for you and force anything you do in your directory to run in that separate daemon process group.

So presuming things are somewhere under your home directory, they should use something like:

WSGIDaemonProcess gozzilli user=gozzilli

<Directory /home/gozzilli>
WSGIProcessGroup gozzilli
</Directory>