2010/1/6 dcorbe <[email protected]>: > Hi, > > I've tried the (relatively straight-forward-looking) steps to get > django and mod_wsgi working together with little success thus far. > I'm trying to run a simple django application from my Apache web > server. The documentation doesn't make it clear whether user= and > group= needs to be set to the webserver's uid/gid (which it currently > is) or whether it needs to be set to the uid/gid that own the > application (which I tried with no success).
As documented in: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess if you don't specify user/group to WSGIDaemonProcess option, the daemon process will run with same user/group as Apache server child processes run. Specifically, what the User/Group directives are set for in Apache configuration. Normally this equates to a special Apache user. Whether you leave it that way really depends on whether you are happy making as appropriate directories writable by that user where your application needs to write files. As such, wouldn't be dictated by who owns Django source code files, but who owns any data/upload directories it needs to write to. > Beyond that I'm not sure how to proceed. Not sure what else to say as beyond your confusion about what to do, you don't clearly specify what the actual problem you are having is when running your application. Graham > It appears as if mod_wsgi is configured and installed properly: > > [Tue Jan 05 08:24:29 2010] [notice] Apache/2.2.13 (Unix) mod_ssl/ > 2.2.13 OpenSSL/0.9.8e DAV/2 mod_wsgi/3.1 Python/2.5.4 PHP/5.2.10 SVN/ > 1.6.5 configured -- resuming normal operations > > I'm configuring the system like so: > > <VirtualHost 206.71.169.114> > ServerName blog.corbe.net > DocumentRoot /usr/local/apache2/htdocs > > Alias /media/ /usr/home/dcorbe/corbenet/www/media/ > Alias /download/ /usr/home/dcorbe/corbenet/www/ > download/ > Alias /static/ /usr/home/dcorbe/corbenet/byteflow/ > static/ > > WSGIDaemonProcess site-corbenet user=daemon group=daemon > threads=10 > WSGIProcessGroup site-corbenet > WSGIScriptAlias / /usr/home/dcorbe/corbenet/ > byteflow-wsgi.py > > ErrorLog logs/blog-error_og > CustomLog logs/blog-access_log combined > </VirtualHost> > > Django is installed globally on this system (it appears in site- > python) and the byteflow-wsgi.py contains the following: > > #!/usr/local/bin/python > > import os, sys > > sys.path.append('/usr/home/dcorbe/corbenet/byteflow') > > os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' > > import django.core.handlers.wsgi > application = django.core.handlers.wsgi.WSGIHandler() > > Any help is appreciated. Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > > >
-- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
