Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: nginx connet to .sock failed (13:Permission denied) - 502 bad gateway

$
0
0
It seems like this problem is quite common. I'd suggest you try the following steps and see if it solves the problem:

In the nginx.conf file, by default the user as nginx is defined at the very top section of the nginx.conf file as seen below;
user nginx; # Default Nginx user

Change nginx to the name of your current user - here, David is my current username.

user David; # Run Nginx as David's permissions (as username of the current logged in user)

Toggle the SELinux boolean value for httpd network connect to on, with the persistant flag: setsebool httpd_can_network_connect on -P

Also, I found some of these commands which might come handy in fixing SELinux:

sudo cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M mynginx sudo semodule -i mynginx.pp
https://exonlinecalculator.com/how-to-find-vat-number-of-company/

Viewing all articles
Browse latest Browse all 4759

Trending Articles