It isn't the permissions on the socket file which can be the issue, the 
directory that the socket file is in must be readable/searchable by the 
'nobody' user. Same applies to any directories all the way from '/' down to 
that directory.

What do you get for:

ls -las /usr/local/apache/logs

Graham

On 10/12/2014, at 11:06 AM, Christiaan Stoudt <[email protected]> wrote:

> Hello...
> 
> I was able to get my Django site working with mod_wsgi and Apache after 
> learning all the configuration, etc.  Thank you for the great documentation 
> and help.  So I want it clearly stated that I have mod_wsgi working.
> 
> Unfortunately I am running out of RAM so I decided to switch over to a 
> WSGIDaemon configuration.  This is where my problem is... I have hit a dead 
> end and no matter how deep I search I continue to have no success.  I hope I 
> can get some help here. Below are all the details I have in hopes to get a 
> response...
> 
> Error:   (13)Permission denied: [client xx.xx.xx.xx:xxxx] mod_wsgi 
> (pid=4570): Unable to connect to WSGI daemon process 'mydomain_com' on 
> '/usr/local/apache/logs/wsgi.4560.0.1.sock' after multiple attempts.
> 
> Server details:
> -- VPS Provider - KnownHost
> -- OS Version - CentOS 6.6 (final)
> -- Python 2.7.5
> -- VirtualENV 1.11.6
> -- Django 1.7.1
> -- mod_wsgi 3.4
> -- httpd -V
> ---- Server version: Apache/2.4.10 (Unix)
> ---- Architecture:   32-bit
> ---- Server MPM:     prefork    /    threaded:     no    /    forked:     yes 
> (variable process count)
> -- Note: Apache runs as NOBODY for the chile processes
> -- SELinux getenforce = Disabled
> 
> -- In the pre.virtualhost.global.conf file I have these settings (this gets 
> merged with httpd.con):
> LoadModule wsgi_module /usr/local/apache/extramodules/mod_wsgi.so
> AddHandler wsgi-script .wsgi
> WSGISocketPrefix /var/run/wsgi 
> 
> -- In the virtual host conf I have these settings:
> WSGIDaemonProcess mydomain_com threads=10 inactivity-timeout=300 
> maximum-requests=2000 display-name=%{GROUP}
> WSGIProcessGroup mydomain_com
> WSGIScriptAlias / /home/mydomain/public_html/d171p275/mydomain_com/wsgi.py
> 
> -- In my wsgi.py file I have these settings:
> import os, sys
> sys.path.append('/home/mydomain/public_html/d171p275')
> sys.path.append('/home/mydomain/venv/d171p275/lib/python2.7/site-packages/')
> os.environ["DJANGO_SETTINGS_MODULE"] = "mydomain_com.settings"
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
> 
> ~~~~~~~~~
> 
> I see that the wsgi.xx.sock file was originally created in the 
> /etc/httpd/logs/ folder with nobody:root as permissions and a 0 size.  After 
> putting in the WSGISocketPrefix setting, it moved to the /var/run folder but 
> the error persists.  I have also tried to create a folder off of the / folder 
> with permissions: nobody:nobody and I still get the error.  I have also tried 
> to add the user and group entries in WSGIDaemonProcess for both the "nobody" 
> account as well as the "mydomain" account that the virtual host domain was 
> created on.
> 
> Also I have moved the WSGI.PY file into various other folders (even the same 
> one the wsgi.xx.sock file sat in) to make sure the apache spawned process 
> could see it.  It is not a SELinux or MPM issue.  I don't have a python-path 
> in the WSGIDaemon process because it seems that WSGI is finding the wsgi.py 
> file in the public_html folder for the domain just fine.
> 
> Honestly I just have NO OTHER IDEAS!!  Since I am still new to this I 
> wouldn't doubt it is something stupid. :)  Any suggestions?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to