安装
rpm -ivh nginxxxx
解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
配置nginx:
防火墙设置:selinux
安装组件:
#查询状态
sestatus
#开启selinux
setenforce 1
#关闭selinux
setenforce 0
vim /etc/selinux/config
# vim /etc/selinux/config
# 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
#SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
允许nginx 白名单:
yum install policycoreutils-python
cat /var/log/audit/audit.log | grep nginx | grep denied | audit2allow -M mynginx
semodule -i mynginx.pp