[Django]-Name duplicates previous WSGI daemon definition

24👍

change originalsite name

not in the directory address just the name like

WSGIDaemonProcess somethingelse python-path=/var/www/originalsite:/var/www/originalsite/env/‌​lib/python2.7/site-p‌​ackages

and

WSGIProcessGroup somethingelse
👤max

22👍

If you’re facing this issue while using certbot command to install multiple "Let’s Encrypt Certificates" then it may be due to some bug in certbot, as discussed here. For a quick workaround, you can comment

WSGIScriptAlias 
WSGIDaemonProcess 
WSGIProcessGroup

to run certbot command and then remove the comments afterwards.

7👍

The reason for the error is because the name of a mod_wsgi daemon process group must be unique across the whole Apache installation. It is not possible to use the same daemon process group name in different VirtualHost definitions. This is necessary to avoid conflicts when working out what daemon process group is being referred to in certain situations.

4👍

I’ve solved this problem by commenting the below 3 lines in /etc/apache2/sites-enabled/000-default.conf

# WSGIDaemonProcess 
# WSGIProcessGroup 
# WSGIScriptAlias

then reload/restart Apache2.

And I leave them as is in /etc/apache2/sites-enabled/default-ssl.conf because it’s duplicated in HTTP (non-SSL) and HTTPS (SSL)

1👍

I have the same problem with Apache2 configuration.
In my case I have duplicated 000-default.conf file in /etc/apache2/sites-enabled.

First I looking ‘WSGIDaemon’ string in Linux:

grep -iRl "WSGIDaemon" ./

Second analize every line. I found duplicated file on /etc/apache2/sites-enabled/000-default-copy.conf. After delete, checking syntax:

sudo apachectl configtest

return ‘Syntax OK’. I spend on this 4 hours… I hope somebody use this 🙂

👤Bob

1👍

Although there are correct answers given, I was still confused when reading the answers. So here’s some clarification for the particular case when enabling HTTP and HTTPS for a single site on Apache.

In one of your configuration files (let’s say HTTP):

# Add this outside of VirtualHost scope to ensure it's global
WSGIDaemonProcess some_name python-path=/var/www/originalsite:/var/www/originalsite/env/‌​lib/python2.7/site-p‌​ackages

...


# Within VirtualHost
WSGIProcessGroup some_name

In the other configuration file (HTTPS):

WSGIProcessGroup some_name

That’s it. What it does is link the same group in both the config files. The process name is defined only in one config files and that makes Apache happy.

👤Sarang

Leave a comment