小紀的程序員生活!

          Linux 中SeLinux 的禁用方式

          前幾天在遷移Apache Web Server時,發現其中使用反向代理的頁面不能顯示。Apache配置文件中反向代理的配置如下:

              ProxyRequests Off
              ProxyPass /homepage/ http://192.168.120.35:9902/homepage/
              ProxyPassReverse /homepage/ http://192.168.120.35:9902/homepage/


          經網上查看資料,發現是SELinux在作怪,現在記錄下來,以后繼續完善
          1、臨時禁用SELinux:
          root@server# setenforce 0
              
          這樣重啟服務器之后,還是會啟動SELinux,
          2、永久禁用:
          打開服務器上的SELinux配置文件,默認為:/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 - SELinux is fully disabled.
          SELINUX=enforcing
          # SELINUXTYPE= type of policy in use. Possible values are:
          #       targeted - Only targeted network daemons are protected.
          #       strict - Full SELinux protection.
          SELINUXTYPE=targeted

          將上面的
          SELINUX=enforcing 改為:SELINUX=disable  禁用SeLinux

          posted on 2010-04-29 13:17 紀敏強 閱讀(2404) 評論(0)  編輯  收藏 所屬分類: Linux

          My Links

          Blog Stats

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章分類

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 股票| 宿松县| 兴安盟| 伽师县| 乐亭县| 和硕县| 丹江口市| 东港市| 稻城县| 青冈县| 香格里拉县| 西城区| 武平县| 安溪县| 临桂县| 桂林市| 资源县| 绩溪县| 清水河县| 达拉特旗| 正宁县| 黄冈市| 海城市| 乡宁县| 灌云县| 库车县| 郁南县| 海盐县| 鸡泽县| 神农架林区| 夏津县| 西乌| 景洪市| 抚顺县| 永新县| 内乡县| 台北市| 四平市| 柘荣县| 班戈县| 余庆县|