卸载nginx之后重新安装
Ubuntu 14.04上卸载nginx之后重新安装没有重新生成配置文件的解决方法
在配置nginx做实验时配置错了,导致访问不了虚拟主机。一狠心把nginx的配置文件目录(/etc/nginx)都删除了,而且我没有备份这些配置文件,因此想重装nginx。
本来以为直接使用如下apt-get指令
Shell
|
1
2
|
$ sudo apt-get --purge remove nginx
$ sudo apt-get install nginx
|
就可以搞定,但实际上并没有有自动产生nginx的配置文件,连/etc/nginx目录都没产生。
于是autoremove
Shell
|
1
2
3
|
$ sudo apt-get --purge remove nginx
$ sudo apt-get autoremove
$ sudo apt-get install nginx
|
提示
Vim
|
1
|
awk: cannot open /etc/nginx/nginx.conf (No such file or directory)
|
虽然产生了/etc/nginx目录了,但只有部分配置文件
Shell
|
1
|
conf.d sites-available sites-enabled
|
于是
Shell
|
1
2
3
|
$ sudo apt-get --purge remove nginx
$ sudo apt-get autoremove
$ dpkg --get-selections | grep nginx
|
罗列出与nginx相关的软件
Shell
|
1
|
nginx-common
|
然后卸载并重新安装
Shell
|
1
2
|
$ sudo apt-get --purge remove nginx-common
$ sudo apt-get install nginx
|
卸载nginx之后重新安装的更多相关文章
- Centos7 卸载 Nginx 并重新安装 Nginx
1) 卸载nginx [root@locahost /]# yum remove nginx 2) 查看nginx是否还存在 [root@localhost /]# which nginx 3)重新 ...
- 完全卸载nginx的详细步骤
一个执着于技术的公众号 前言 在开局配置Nginx时有可能会配置错误,报各种错误代码.看不懂或者懒得去看这个报错时,其实最简单的方式是卸载并重装咯.今天就带大家一起学习下,如何彻底卸载nginx程序. ...
- Ubuntu安装Nginx和正确卸载Nginx Nginx相关
1.Ubuntu下安装Nginx比较简单 敲入下列命令即可: sudo apt-get update sudo apt-get install nginx 2.Ubuntu下卸载,稍不注意就会入坑 s ...
- Centos7卸载nginx及php、php-fpm方法
Centos7卸载nginx及php.php-fpm方法 2016年12月01日 18:17:22 阅读数:20824 本文环境:Centos7.yum方式安装的nginx和php.php-fpm 之 ...
- 不卸载Nginx隐藏版本号
[修改配置文件](不卸载Nginx隐藏版本号,直接修改配置文件) Linux环境: [root@localhost nginx-1.16.1]# curl -I http://10.56.1.115 ...
- 安装卸载nginx
http://www.nginx.cn/install ubuntu和debain下的apt方式安装软件很方便,特别是对于新手安装和卸载nginx. 由于nginx不能动态添加模块,所以会经常安装和卸 ...
- Ubuntu下安装与卸载Nginx
1.Ubuntu下安装Nginx比较简单 敲入下列命令即可: sudo apt-get update sudo apt-get install nginx 2.Ubuntu下卸载,稍不注意就会入坑 s ...
- ubuntu完全卸载nginx
删除nginx连带配置文件 sudo apt-get purge nginx # Removes everything. 卸载不再需要的nginx依赖程序 sudo apt-get autoremov ...
- 解决Windows 7下IE11无法卸载、无法重新安装,提示安装了更新的IE版本
2013年12月14日 iefans 有用户反馈在Windows 7系统上安装IE11时发现安装程序似乎出了问题,等待了很长时间都没有响应之后就断开了电脑的电源.之后IE11浏览器虽然能使用,却无法安 ...
随机推荐
- catch socket error
whois_handler.dart import 'dart:io'; import 'package:async/async.dart'; import 'dart:convert'; class ...
- 谈谈MySQL中的锁
谈谈MySQL中的锁 锁的定义 在生活中锁的例子就非常多了,所以应该很容易理解锁的含义.在计算机领域,可以这样来概述,锁是计算机协调多个进行进程并发访问某一资源的机制. 在数据库中,锁也是一个 ...
- 处理vue-quill-editor回显数据的时候没有空格问题
这是我要实现的效果 这是我回显后的情况(可以看见空格都没有了) 处理后 处理方法 添加一个class="ql-editor" <quill-editor class=&qu ...
- JAVA基础之设置随机成语验证码
package com.oracle; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import ja ...
- Oracle中nlssort()函数排序功能
转自:https://www.iteye.com/blog/libaxiaoyuan-2199851 Oracle9i之前,中文是按照二进制编码进行排序的.在oracle9i中新增了按照拼音.部首.笔 ...
- 使用 audioqueue 播放PCM数据
// // MainViewController.h // RawAudioDataPlayer // // Created by SamYou on 12-8-18. // Copyright (c ...
- maven学习笔记二(了解maven的基本命令)
maven常用的命令 mvn archetype:create 创建Maven项目 mvn compile 编译源代码 mvn deploy 发布项目 mvn test-compile 编译测试源代码 ...
- linux档案和目录管理(后续)
资料来自鸟哥的linux私房菜 四:档案和目录的预设权限和隐藏权限 umask:预设权限,相比与chomd的4,2,1权限,档案满分为666,目录满分为777,umask可以预设消除部分权限,比如一个 ...
- Javascript技能
Javascript技能 说一说我对 Javascript 这门语言的一些总结(适合前端和后端研发) 基本认识 一些心得 思维脑图的链接(icloud 分享): https://www.icloud. ...
- 第9期《python3接口自动化测试》课程,6月29号开学!
2019年 第9期<python3接口自动化测试>课程,6月29号开学! 主讲老师:上海-悠悠 上课方式:QQ群视频在线教学 本期上课时间:6月29号-7月28号,每周六.周日晚上20:3 ...