1

I am trying to run Nginx/uWSGI/Django, the last remaining step is to run the socket_file all I get is a 502 Bad Gateway.

Route my django application.
#/home/deploy/webapps/myapp

Configuration uWSGI.ini

[uwsgi]      
chdir           = /home/deploy/webapps/%n/%n
module          = %n.wsgi
home            = /home/deploy/webapps/%n
master          = true
processes       = 8
socket          = /tmp/%n.socket
no-orphans      = true

Some data error that throws me

 sudo cat /var/log/audit/audit.log | grep nginx | grep denied
 type=AVC msg=audit(1425427877.289:379): avc:  denied  { write } for  pid=1215 comm="nginx" name="myapp.socket" dev="sda1" ino=276 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:httpd_log_t:s0 tclass=sock_file

The big question is how I can work with files socket in Redhat, I come from Ubuntu and I'm doing my best, thank you.

Colpaisa
  • 23
  • 4

1 Answers1

-1

It seems similar problem what I have gone through.

This link will be huge help.

https://www.nginx.com/blog/nginx-se-linux-changes-upgrading-rhel-6-6