SELinux + Nginx on port 82 = FAIL

Started by Laur, November 11, 2015, 07:36:59 PM

Previous topic - Next topic

Laur

Hello,

First, i want to thank the staff of CWP, it's a awesome panel, and I will donate soon.

In second row i want to explain what problem I have when I activate SELinux with that configuration:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted



and with WebServer configuration: Apache & Varnish Cache & Nginx Reverse Proxy (Varnish on port 80, Nginx on port 82 and apache on port 8181)

the problem is NGINX can't start because it's on port 82

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:82 failed (13: Permission denied)
[FAILED]



Thank you very much.

Igor S.

Hello.

I'm afraid the CWP still does not have support SELinux. We're recommend turn off it if you do not understand how to configure SELinux.
You can check what software exactly use the port:
netstat -nlp | grep :82
and then to kill the proccess.



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services

cyfocus

Try changing SElinux to permissive

and report back.
------
https://cyfocus.com - Domain, Hosting, Ecommerce, SEO

Laur

#3
Hello,

I set it on permissive and i can run nginx and others, but i really want to protect my /etc/passwd for read from php, how i put php.ini on every subdomain(virtual host from nginx) ?

EDIT: Done, with: open_base_dir in php.ini at every subdomain and chmod 777 with root so the client can't modify it...
Anyway, i need another metodh.
Thanks.

Igor S.




You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services