Django Apache mod_wsgi permission errors
<p>Have setup Django in virtualenv but get 500 Internal Server Error. Development server worked fine.</p>

<h2>Environment:</h2>

<ul>
<li>Python 2.7.12</li>
<li>Apache 2.4.23</li>
<li>Django 1.10</li>
<li>Fedora 24</li>
</ul>

<h2>Server log:</h2>

<pre><code>[Mon Aug 29 12:27:49.364393 2016] [mime_magic:error] [pid 19158] [client 14.2.108.225:49222] AH01512: mod_mime_magic: can't read `/home/fedora/motorable/motorable/wsgi.py'
[Mon Aug 29 12:27:49.364552 2016] [mime_magic:error] [pid 19158] [client 14.2.108.225:49222] AH01512: mod_mime_magic: can't read `/home/fedora/motorable/motorable/wsgi.py'
[Mon Aug 29 12:27:49.364904 2016] [wsgi:error] [pid 19157] (13)Permission denied: [remote 14.2.108.225:1832] mod_wsgi (pid=19157, process='motorable', application='ip-172-31-22-170.ap-southeast-2.compute.internal|'): Call to fopen() failed for '/home/fedora/motorable/motorable/wsgi.py'.
</code></pre>

<h2>Configuration:</h2>

<pre><code>Alias /static /home/fedora/motorable/static
&lt;Directory /home/fedora/motorable/static&gt;
    Require all granted
&lt;/Directory&gt;

&lt;Directory /home/fedora/motorable/motorable&gt;
    &lt;Files wsgi.py&gt;
        Require all granted
    &lt;/Files&gt;
&lt;/Directory&gt;

WSGIDaemonProcess motorable python-path=/home/fedora/motorable:/home/fedora/mot$
WSGIProcessGroup motorable
WSGIScriptAlias / /home/fedora/motorable/motorable/wsgi.py
WSGISocketPrefix /var/run/wsgi
</code></pre>

<p>WSGI is running in daemon mode, I tried adding the <code>WSGISocketPrefix</code> directive but I'm not sure what else to check or do. First time experimenting with Django here. The user home directory is 710 and should allowing Apache in, I added apache user to the primary group of fedora.</p>

<p>Can anyone share some insight?</p>

<p>Moving the project outside the home directory to /var/www/django solved my question.</p>

python django apache mod-wsgi