zoukankan      html  css  js  c++  java
  • apache 更换掉80端口报错

    如果:

    apache 更换掉80端口启动报错(报错内容如下文):

    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    (13)Permission denied: make_sock: could not bind to address 10.10.15.19:81
    no listening sockets available, shutting down
    Unable to open logs

    是因为:

    linux apache服务所使用的端口是有被系统约束的,乱用端口系统看来是非法的,一至于apache服务绑定不到该端口而启动失败。

    那么:

    想要查看管理端口的使用,你需要安装一个 linux安全管理工具之 semanage (security manage)

    第一、

    保你yum工具正常可用,如未更新,查看博客:http://www.cnblogs.com/tangsen/p/5151994.html

    第二、安装semanage

    #yum provides /usr/sbin/semanage (结果中可看到policycoreutils-python的包名)

    #yum -y install install policycoreutils-python-2.0.83-24.el6.x86_64 (这是我的,你复制你自己的包名)

    第三、分配端口

    # semanage port -l|grep http  (查看目前httpd的端口使用范围)

    # semanage port -a -t http_port_t -p tcp 8010  (分配个8010给http_port_t)

    # service httpd restart  (修改httpd.conf 文件端口改成8010,再重启,访问成功则ok)

    更多semanage命令使用,查看友情链接:

    http://kinggoo.com/app-httpderrornotport.htm

  • 相关阅读:
    安卓AlertDialog的使用
    蚂蚁的腿
    年龄排序
    Digital Roots
    小明的存钱计划
    不高兴的小明
    管闲事的小明
    小明的调查作业
    爱摘苹果的小明
    小明的难题
  • 原文地址:https://www.cnblogs.com/tangsen/p/5160882.html
Copyright © 2011-2022 走看看