zoukankan      html  css  js  c++  java
  • SELinux配置不当导致httpd无法在非80端口启动

    检测是否为selinux导致httpd启动失败,若setenforce 0以后就可以启动,就表示selinux配置不当。

    首先本机要支持semanage命令,安装方法网上有。

    semanage  port -l | grep http  //查看润徐httpd的端口

    [root@localhost logs]# semanage  port -l | grep http
    http_cache_port_t              tcp      3128, 8080, 8118, 11211, 10001-10010
    http_cache_port_t              udp      3130, 11211
    http_port_t                    tcp      80, 443, 488, 8008, 8009, 8443
    pegasus_http_port_t            tcp      5988
    pegasus_https_port_t           tcp      5989

    semanage port -a -t http_port_t -p tcp 81  //添加81端口

    http_port_t                    tcp      81, 80, 443, 488, 8008, 8009, 8443

    再看就有了,然后

    [root@localhost logs]# setenforce 1
    [root@localhost logs]# service httpd start
    Starting httpd: 
    [root@localhost logs]# service httpd status
    httpd (pid  21673) is running...

    开机启动

    chkconfig httpd on

    --------------------------------

    页面错误

    httpd You don't have permission to access / on this server. 

    日志显示

    Permission denied: /home/airc/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

    解决

    chmod -R 755 /home/airc/

    原因DocumentRoot的父目录权限错误

  • 相关阅读:
    重载运算符
    旅行家的预算(贪心)
    树屋阶梯(卡特兰数+高精除低精+高精乘低精)
    种树 3(差分约束)
    差分约束系统详解
    最优分解方案(贪心+高精乘单精)
    雷达安装(贪心)
    加工生产调度(Johnson算法 双机流水作业调度问题)

    Jquery整理
  • 原文地址:https://www.cnblogs.com/ShepherdIsland/p/3158153.html
Copyright © 2011-2022 走看看