Apache, service httpd stop, Address already in use:
service httpd stop
Stopping httpd: [FAILED]
[root@testtest apache_logs]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
=========================
Cause:
This problem is caused by another service listening to TCP/IP port 80.
Solution:
1. OK $ sudo fuser -k -n tcp 80
OK $ sudo /etc/init.d/httpd start
2. Change the listen port in the httpd config file to 81, by doing this we want to see which service is using port 80.
just do the following command as root :
#netstat -tlp
after running the command.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1546/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1429/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1592/postmaster
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2360/sendmail: acce
tcp 0 0 0.0.0.0:8554 0.0.0.0:* LISTEN 3207/gnome-dvb-daem
tcp 0 0 0.0.0.0:54858 0.0.0.0:* LISTEN 1369/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1310/rpcbind
tcp 0 0 :::59092 :::* LISTEN 1369/rpc.statd
tcp 0 0 :::22 :::* LISTEN 1546/sshd
tcp 0 0 ::1:631 :::* LISTEN 1429/cupsd
tcp 0 0 :::443 :::* LISTEN 2593/httpd
tcp 0 0 :::6881 :::* LISTEN 2757/ktorrent
tcp 0 0 :::111 :::* LISTEN 1310/rpcbind
tcp 0 0 :::80 :::* LISTEN 2593/httpd
tcp 0 0 :::81 :::* LISTEN 2593/httpd
now
we know that port 80 is utilised by another service, so locate and
change system-config-httpd.conf: system-config-httpd.conf
system-config-httpd.conf. all of this, restart httpd:
/etc/init.d/httpd start
3. Third solution is to change binging address in your httpd.conf like this:
Listen 127.0.0.1:80 ( that means: instead of Listen 0.0.0.0:80)
Apache, service httpd stop, Address already in use:的更多相关文章
- linux上安装apache以及httpd.conf基本配置
1.yum安装apache #yum install httpd -y 2.随系统自启动 #chkconfig httpd on 3.开启apache #service httpd start PS: ...
- Apache service named reported the following error(OS 10055)由于系统缓冲区空间不足或队列已满解决办法?
apache启动失败报错: The Apache service named reported the following error:>>> AH00451: no listeni ...
- Apache 的 httpd.conf 详解
ServerRoot “/usr/local“ ServerRoot用于指定守护进程httpd的运行目录,httpd在启动之后将自动将进程的当前目录改变为这个目录,因此如果设置文件中指定的文件或目录是 ...
- 安装新版xampp后apache无法启动提示:Apache Service detected with wrong path解决方案
我以前安装过xampp,因为学习thingPHP需要升级PHP5.0以上,所以我就卸掉了xampp,从新安装新版本的xampp其中PHP是最新版的,但是安装后启动xampp提示如下:Apache Se ...
- windows apache 配置多个服务 站点 Apache Service Monitor
把Apache安装为多个Window NT服务 ~~~ 可以在 services.msc中查看到1. 在DOS下跳到Apache安装目录里的bin目录(~~~或者用path命令 把apache的安装目 ...
- 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.
原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...
- Apache 的 httpd.conf 注释
ServerRoot “/usr/local“ ServerRoot用于指定守护进程httpd的运行目录,httpd在启动之后将自动将进程的当前目录改变为这个目录,因此如果设置文件中指定的文件或目录是 ...
- linux apache的httpd
学习目标:apache在linux上的应用,通过三种方式在浏览器上访问 LAMP:linux+apache+MYSQL+php wamp:windows+apache+MYSQL+php linux上 ...
- Apache配置文件httpd.conf内容翻译
本文已经废弃,现在apache2不依靠httpd.conf来配置. Ubuntu下默认的配置文件是/etc/apache2/sites-available/default 可以修改上面文件来修改a ...
随机推荐
- error.log worker_connections exceed open file resource limit: 1024
不按照预期响应请求 nginx.conf中worker_connections 与ulimt -n 配置的冲突
- OKEx量化分析报告[2017-12-09]
OKEx量化分析报告[2017-12-09] [分析时间]2017-12-09 15:24 [分析对象]OKEx [计价币种]USDT [报告内容]DASH_USDT短期 -3.8中期 ...
- Java 之NIO
1. NIO 简介 Java NIO(New IO)是从1.4版本开始引入的一个新的IO API,可以替代标准的Java IO API; NIO 与原来的IO有同样的作用和目的,但是使用的方式完全不同 ...
- log4cpp简单示例
log4cpp简单示例 下载地址 Sample.cpp #include <iostream> #include <log4cpp/FileAppender.hh> #incl ...
- 调试maven源代码
下载源代码,导入idea 运行MavenCli ,设置vm参数 -Dclassworlds.conf=/Users/fsq/Downloads/apache-maven-3.6.2.0/bin/m2. ...
- Linux进程虚拟地址空间管理2
2017-04-12 前篇文章对Linux进程地址空间的布局以及各个部分的功能做了简要介绍,本文主要对各个部分的具体使用做下简要分析,主要涉及三个方面:1.MMAP文件的映射过程 2.用户 内存的动态 ...
- PCI 设备详解一
2016-10-09 其实之前是简单学习过PCI设备的相关知识,但是总感觉 自己的理解很函数,很多东西说不清楚,正好今天接着写这篇文章自己重新梳理一下,文章想要分为三部分,首先介绍PCI设备硬件相关的 ...
- git在使用中出现 refusing to merge unrelated histories如何解决?
一.GIT的使用 # 设置用户名 git config --global user.name "zhaijihai" # 设置用户邮箱 git config --global us ...
- Java设计模式-简单工厂模式(Static Factory Method)
简单工厂模式(Static Factory Method) 简单工厂模式是类的创建模式,又叫静态工厂方法(Static Factory Method)模式.简单工厂模式是由一个工厂对象决定创建出哪一种 ...
- 你没见过的python语法
目录: 1.不一样的列表 2.改变type中的规则,创建类:类属性大写 3.%s字串格式化,不用元组用字典 4.没有参数抛出异常 5.字符串签名加f 格式化字符串 6.attr库 1.不一样的列表 l ...