502 bad gateway mvc core app on CentOS 502 bad gateway mvc core app on CentOS nginx nginx

502 bad gateway mvc core app on CentOS


I tried apache and had the same problem. Then i found the solution, you have to set httpd_can_network_connect.

http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/

A didn't find the error message in the audit blog that the author was talking about but i tried his solution and it worked.

I have used centos for 4 days now and it's the second time i have to set a bit to solve a problem. These solutions are quite hidden in the web and most articles dealing with the area doesn't mention those so i lost a lot of time. So i share the opinion of the author about SELinux. Probably i will try another linux distribution.What is also interesting that I followed the official microsoft tutorial "Set up a hosting environment for ASP.NET Core on Linux with Apache, and deploy to it". The operating system that they use is CentOS too. And it doesn't mention this bit either.