LAMP架构中,php 与 php、php与C语言程序等 之间 的网络通信 问题
问题:
php(客户端) 不能连接 php(服务器端) 或者 php(客户端) 不能连接 C语言程序(服务器端)
解决:
[root@localhost ~]# getsebool -a|grep http
allow_httpd_anon_write --> off
allow_httpd_bugzilla_script_anon_write --> off
allow_httpd_cvs_script_anon_write --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_nagios_script_anon_write --> off
allow_httpd_prewikka_script_anon_write --> off
allow_httpd_squid_script_anon_write --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_network_connect --> off
httpd_can_network_connect_db --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> on
httpd_disable_trans --> off
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> on
httpd_read_user_content --> off
httpd_rotatelogs_disable_trans --> off
httpd_ssi_exec --> off
httpd_suexec_disable_trans --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_nfs --> off
[root@localhost ~]# setsebool httpd_can_network_connect on
// 重启电脑,httpd_can_network_connect --> off
[root@localhost ~]# setsebool -P httpd_can_network_connect on
// 重启电脑,httpd_can_network_connect --> on
学习selinux http://book.51cto.com/art/200810/94193.htm
阅读(532) | 评论(0) | 转发(0) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
php(客户端) 不能连接 php(服务器端) 或者 php(客户端) 不能连接 C语言程序(服务器端)
解决:
[root@localhost ~]# getsebool -a|grep http
allow_httpd_anon_write --> off
allow_httpd_bugzilla_script_anon_write --> off
allow_httpd_cvs_script_anon_write --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_nagios_script_anon_write --> off
allow_httpd_prewikka_script_anon_write --> off
allow_httpd_squid_script_anon_write --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_network_connect --> off
httpd_can_network_connect_db --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> on
httpd_disable_trans --> off
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> on
httpd_read_user_content --> off
httpd_rotatelogs_disable_trans --> off
httpd_ssi_exec --> off
httpd_suexec_disable_trans --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_nfs --> off
[root@localhost ~]# setsebool httpd_can_network_connect on
// 重启电脑,httpd_can_network_connect --> off
[root@localhost ~]# setsebool -P httpd_can_network_connect on
// 重启电脑,httpd_can_network_connect --> on
学习selinux http://book.51cto.com/art/200810/94193.htm
相关热门文章
给主人留下些什么吧!~~
评论热议