Apache, Django and mod_wsgi

user171453

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.

Oli

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Django, apache and mod_wsgi

multiple django sites with apache & mod_wsgi

Setup Django with apache using mod_wsgi

Django apache configuration with mod_wsgi module

apache mod_wsgi error with django in virtualenv

Deploying Django on Apache with mod_wsgi

Asking for advice on Django deployment settings with Apache and mod_wsgi

Gateway Timeout Using Django on Apache with mod_wsgi

Django + mod_wsgi + apache2: server hangs

Apache with virtualenv and mod_wsgi : ImportError : No module named 'django'

Cannot deploy Official Django tutorial on Apache (mod_wsgi)

Django Custom Error Handlers in Apache and mod_wsgi

Django on Apache with mod_wsgi CSRF Verification Failed

Django on apache wtih mod_wsgi (Linux) - 403 Forbidden

Django - Apache with mod_wsgi not serving static-files

running django python 3.4 on mod_wsgi with apache2

Django + pipenv + Apache + mod_wsgi deployment on ubuntu not loading modules

Apache + mod_wsgi + django: send a default response for a backlogged request

My virtualenv is not taking into account ? [apache, mod_wsgi and django]

Can not find CSS file path in Django on Apache with mod_wsgi

Django MOD_WSGI Settings ? MOD_WSGI Apache2 403 You don't have permission to access this resource

Apache mod_wsgi and Qt

Deploying Django on Apache2 with mod_wsgi - Correct location for Django project?

In production, Apache + mod_wsgi or Nginx + mod_wsgi?

Django + Celery + Apache mod_wsgi + Postgres + RabbitMQ Application for multiple clients

Deploying Django app on Ubuntu 16.04 apache2 with mod_wsgi

Install mod_wsgi on Ubuntu with Python 3.6, Apache 2.4, and Django 1.11

Django with Mod_WSGI on ubuntu 18.04 with Apache2 Permission denied for media/

Location of settings file for deploying static files with Django on Apache2 with mod_wsgi