Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 12.04 and trying to configure my Apache server with Django. I tried a couple of different online tutorials and keep on getting errors. This is my latest error when I try to start my server:

 * Starting web server apache2  
     apache2: Syntax error on line 214 of /etc/apache2/apache2.conf:
     Syntax error on line 2 of /etc/apache2/httpd.conf: 
     Cannot load /etc/apache2/modules/mod_wsgi.so into server: 
     /etc/apache2/modules/mod_wsgi.so: 
     cannot open shared object file: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
                                                                 [fail]

Any help would be appreciated.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Make sure libapache2-mod-wsgi is installed, and that it is enabled:

sudo apt-get install libapache2-mod-wsgi
sudo a2enmod wsgi

If you're using Python3 you might need libapache2-mod-wsgi-py3 instead. They can't both be installed at the same time but they both use the same a2enmod command to enable in Apache.

share|improve this answer
    
Thanks @Dan, I'll alter the muttering at the end of the answer. –  Oli Jun 18 at 16:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.