$ /etc/init.d/apache2 restart
* Restarting web server apache2 [fail]

解决办法4步走:

1. sudo /etc/init.d/apache2 stop
2. sudo killall apache2
3. sudo netstat -l|grep www   # 确认没有服务占用80端口
4. sudo /etc/init.d/apache2 restart

  

  

[ubuntu] service apache2 restart [fail]的更多相关文章

  1. linux nginx service nginx restart [fail]

    命令:nginx -t 查看失败原因: nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sit ...

  2. (转)service apache2 restart失败

    https://askubuntu.com/questions/431925/how-to-restart-apache2-when-i-get-a-pid-conflict sudo kill -9 ...

  3. ubuntu 安装apache2并配置cgi,搭建mimetex转化公式图片的服务

    一.Apache的安装 在终端输入: sudo apt-get install apache2 二.启动.停止Apache服务 Apache的启动和停止文件是:/etc/init.d/apache2 ...

  4. ubuntu下apache2 安装 配置 卸载 CGI设置 SSL设置

    一.安装.卸载apache2      apache2可直接用命令安装           sudo apt-get install apache2      卸载比较麻烦,必须卸干净,否则会影响ap ...

  5. ubuntu 安装apache2,mysql,php5,phpmyadmin等软件

    1.安装apache2  sudo apt-get install apache2  输入Y回车  apache2 安装完成  检测:在浏览器输入localhost 出现It works则成功. 2. ...

  6. Ubuntu下apache2安装配置(内含数字证书配置)

    Ubuntu下apache2安装配置(内含数字证书配置)安装命令:sudo apt-get updatesudo apt-get install apache2 配置1.查看apache2安装目录命令 ...

  7. Ubuntu Service说明与使用方法

    1 什么是Ubuntu的Service 网上很多资料说, service就是linux中随开机自启动的, 并且在后台运行的程序. 个人认为, 至少对于Ubuntu来说, 这个说法是不太准确的, 这只不 ...

  8. Ubuntu 下apache2开启rewrite隐藏index.php

    为了实现 http://www.example.com/route/route 而不是 http://www.example.com/index.php/route/route 需要开启apache2 ...

  9. ubuntu下apache2使用的简单总结

        一. 修改apache2原80端口为90端口 1. 修改/etc/apache2/ports.conf, 将端口80改为90,443,改为444 2. 修改/etc/apache2/sites ...

随机推荐

  1. [剑指Offer] 20.包含min函数的栈

    题目描述 定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数. [思路1]两个栈Stack和Min,Stack为当前栈中元素,Min为与Stack中元素一一对应的当前栈最小值. cl ...

  2. [转载] Win7下MATLAB 7.0下载地址和详细安装

    移步http://blog.csdn.net/feecooling/article/details/7525140 MATLAB中文手册命令汇总http://wenku.baidu.com/view/ ...

  3. ARC076 F Exhausted? Hall定理 + 线段树扫描线

    ---题面--- 题目大意: 有n个人,m个座位,每个人可以匹配的座位是[1, li] || [ri, m],可能有人不需要匹配座位(默认满足),问最少有多少人不能被满足. 题解: 首先可以看出这是一 ...

  4. js金额转大写数字

    //金额转大写数字 const intToChinese = money => { //汉字的数字 let cnNums = new Array('零', '壹', '贰', '叁', '肆', ...

  5. 用原生JavaScript做个简单的回到顶部

    很多网页在下方都会放置一个“返回顶部”按钮,尤其是页面底部没有导航的网页,这样可以帮助访客重新找到导航或者重温一遍广告(想得真美).随着近几年来 JavaScript 的应用日渐广泛,滑动效果无处不在 ...

  6. HDU1151:Air Raid(最小边覆盖)

    Air Raid Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Su ...

  7. 动态性能视图v$session_longops

    v$session_longops This view displays the status of various operations that run for longer than 6 sec ...

  8. Planning your upgrade with Upgrade Advisor

    Planning your upgrade with Upgrade Advisor You should use the Upgrade Advisor tool (if it is availab ...

  9. 跨域请求json数据

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. C++中的垃圾回收和内存管理(续)

    boost memory的gc_allocator的使用 首先编译生成boost-memory的库,由于生成的是.so的动态库,所以需要在运行程序之前,将库文件的路径添加到LD_LIBRARY_PAT ...