Author Topic: SELinux + Nginx on port 82 = FAIL  (Read 9624 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
SELinux + Nginx on port 82 = FAIL
« on: November 11, 2015, 07:36:59 PM »
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:

Code: [Select]
# 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

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


Thank you very much.

Offline
*****
Re: SELinux + Nginx on port 82 = FAIL
« Reply #1 on: November 13, 2015, 07:35:17 AM »
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:
Code: [Select]
netstat -nlp | grep :82and 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

Offline
*
Re: SELinux + Nginx on port 82 = FAIL
« Reply #2 on: November 16, 2015, 04:52:10 PM »
Try changing SElinux to permissive

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

Offline
*
Re: SELinux + Nginx on port 82 = FAIL
« Reply #3 on: November 18, 2015, 07:52:35 AM »
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.
« Last Edit: November 18, 2015, 08:31:29 AM by Laur »

Offline
*****
Re: SELinux + Nginx on port 82 = FAIL
« Reply #4 on: November 20, 2015, 08:12:24 AM »
The CWP don't have SELinux support.
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