您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。