N
N
nexcode2016-03-18 19:00:08
Nginx
nexcode, 2016-03-18 19:00:08

Nginx: Permission denied. How to set up selinux?

systemctl start nginx:

nginx: [emerg] bind() to 0.0.0.0:8082 failed (13: Permission denied)

After thinking a little about the possible reasons, I do the following:
setenforce 0
The daemon has started.
Actually, how to configure selinux so that everything works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lebedev, 2016-03-18
@zymanch

selinux policies specify on which desks services can run; you are using a non-standard port for the web server,
you will need the semanage utility:
if port 8082 is not important to you, then you can see which ports you can run nginx on:

# semanage port -l | grep http_port
http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000

if the listed ports do not suit you, then add your port to the allowed ones:
restart nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question