2009/7/3 Jon <[email protected]>: > > Hello, > > I am trying to use mod_wsgi to run Django on Apache. > > I have followed the tutorial here > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > to run in daemon mode however I am having problems. (NB. I have > replaced my domain name with example.com in the following) > > $ /etc/init.d/apache reload > Syntax error on line 5 of /etc/apache2/sites-enabled/example.com: > Name duplicates previous WSGI daemon definition. > failed!
Which means that you must have multiple WSGIDaemonProcess directives for same name in your Apache configuration file. That or if using include to include your snippet, you are including it twice somehow. Either way, a WSGIDaemonProcess for same name is being seen twice. > My vhost config for my domain is as follows: > > <VirtualHost *:80> > > ServerName www.example.com > > WSGIDaemonProcess www.example.com user=www-data group=www-data > threads=10 There is no point setting user/group here as those are the user/group that Apache runs as anyway. You only need to set them if you want to use something different. > WSGIProcessGroup www.example.com > > Alias /static/ /var/www/www.example.com/static/ > > <Directory /var/www/www.example.com/static> > Order allow,deny > Allow from all > </Directory> > > WSGIScriptAlias / /home/jonathan/src/website/apache/django.wsgi > > <Directory /home/jonathan/src/website/apache> > Order allow,deny > Allow from all > </Directory> > > LogLevel warn > ErrorLog /var/log/apache2/example.com/error.log > CustomLog /var/log/apache2/example.com/access.log combined > > </VirtualHost> > > I have other vhosts, however none are using mod_wsgi - they are just > serving basic PHP sites. > > Grepping the output of ps aux for wsgi doesn't show any wsgi processes > running. That is because they will show as httpd process unless you use 'display-name' option to WSGIDaemonProcess. See: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess > I noticed someone with a similar error posting another discussion in > the group, but still I have not been able to resolve this issue. > > Any ideas what I am doing wrong? Also ensure you are using most up to date mod_wsgi and not some older version. Graham --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
