Apache & mod_wsgi settings for Django Python Project
<p>I am trying to setup my django-python project on Google Compute Engine Debian8 VM. I made few config changes in <code>/etc/apache2/sites-available/000-default.conf &amp; /etc/apache2/sites-available/default-ssl.conf</code> files
Then tried to restart the server. And I got following Errors. Uninstalling &amp; reinstalling the apache2 too is not fixing this error. Any suggestions to fix this issue ?</p>

<p>Command: </p>

<pre><code>sudo service apache2 restart
</code></pre>

<p>Error:</p>

<pre><code>Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
</code></pre>

<p>Command: </p>

<pre><code>sudo systemctl status apache2.service -l
</code></pre>

<p>Error:</p>

<pre><code>apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
   Active: active (exited) since Wed 2016-08-31 05:08:43 UTC; 3min 37s ago
  Process: 3539 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 3521 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 3546 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

Unit apache2.service entered failed state.
Starting LSB: Apache2 web server...
Starting web server: apache2(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
.
Started LSB: Apache2 web server.
</code></pre>

<p>Thanks,</p>

<p>Have you read the error ? It's clearly stated why it fails:</p>

<blockquote>
  <p>Cannot load /usr/lib/apache2/modules/mod_wsgi.so into server: /usr/lib/apache2/modules/mod_wsgi.so: cannot open shared object file: <strong>No such file or directory</strong></p>
</blockquote>

<p>do you have <code>libapache2-mod-wsgi</code> or <code>libapache2-mod-wsgi-python3</code> installed? if you have access to shell you can install it with</p>

<pre><code>sudo apt-get install libapache2-mod-wsgi
# or for python 3
sudo apt-get install libapache2-mod-wsgi-python3
</code></pre>

python django apache google-compute-engine