apache03的访问测试连接http://admin.lt.mopgaming.com/auth/admin/login
ping和telnet指定相应端口测试能够成功,
但是在防火墙开通,memcached和redis相应端口都已经放通的情况下,仍然测试连接不成功。
报错:{"message":"Permission denied [tcp:\/\/198.44.240.242:6379]","code":5000,"data":null}{"message":"Undefined index: _sf2_meta","code":5000,"data":null}
问题原因开启selinux
getsebool -a |grep httpd
[transfor@cp-apache03 ~]$ getsebool -a |grep -i httpd
httpd_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_connect_ftp --> off
httpd_can_connect_ldap --> off
httpd_can_connect_mythtv --> off
httpd_can_connect_zabbix --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> off
httpd_dbus_sssd --> off
。。。
可以看到selinux限制httpd对外访问的权限
setsebool -P httpd_can_network_connect=1
即时生效,可以访问
或者,对selinux不熟悉,直接关闭selinux
setenforce 0 即时生效
getenforce
或者
/etc/sysconfig/selinux
SELINUX=disabled直接关闭,重启生效
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。