问题1: nginx: [emerg] open() "/opt/soft/nginx/mime.types" failed (2: No such file or directory) in /opt/soft/nginx/nginx.config:12

原因:mime.types文件路径不是/opt/soft/nginx/mime.types  而是/opt/soft/nginx/main-conf/mime.types

解决:nginx.config里改为:include       /opt/soft/nginx/main-conf/mime.types;

问题2: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/mime.types:832

原因:还是mime.types路径不对 不是/etc下的mime.types 应该是nginx安装目录下的mime.types才对

解决:nginx.config里改为:include       /opt/soft/nginx/main-conf/mime.types;

nginx启动常遇到的问题的更多相关文章

  1. nginx启动、关闭、重启

    1.启动 [root@localhost local]# nginx/sbin/nginx #启动 [root@localhost local]# nginx/sbin/nginx -t #检查配置文 ...

  2. linux nginx 启动脚本

    linux nginx 启动脚本 [root@webtest76 ~]# vi /etc/init.d/nginx #!/bin/bash # nginx Startup script for the ...

  3. Nginx 启动脚本/重启脚本

    第一步先运行命令关闭nginx sudo kill `cat /usr/local/nginx/logs/nginx.pid` 第二步 vi /etc/init.d/nginx 输入以下内容 #!/b ...

  4. Nginx启动停止命令

    操作环境是Windows 一.nginx命令:启动nginx 在Windows上安装好nginx后,我们需要启动nginx服务,启动nginx服务的命令行操作主要有两种方式,即 cd D:\opens ...

  5. Nginx学习之十一-Nginx启动框架处理流程

    Nginx启动过程流程图 下面首先给出Nginx启动过程的流程图: ngx_cycle_t结构体 Nginx的启动初始化在src/core/nginx.c的main函数中完成,当然main函数是整个N ...

  6. nginx启动报错(1113: No mapping for the Unicode character exists in the target multi-byte code page)

    使用windows版本的nginx启动时遇到(1113: No mapping for the Unicode character exists in the target multi-byte co ...

  7. Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden

    Nginx在win7,win2008下启动报错:bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket i ...

  8. nginx启动

    查看nginx的进程 ps -ef | grep nginx 重启nginx的3种办法1.service nginx restart2.改了配置文件让其生效办法 nginx -s reload3.到n ...

  9. 菜鸟nginx源码剖析 框架篇(一) 从main函数看nginx启动流程(转)

    俗话说的好,牵牛要牵牛鼻子 驾车顶牛,处理复杂的东西,只要抓住重点,才能理清脉络,不至于深陷其中,不能自拔.对复杂的nginx而言,main函数就是“牛之鼻”,只要能理清main函数,就一定能理解其中 ...

随机推荐

  1. window 下忘记了mysql 密码的解决方法

    1.以管理员身份打开cmd,关闭MySQL. net stop mysql 2.跳过权限检查启动,进入安装目录bin下. mysqld --skip-grant-tables或者mysqld-nt - ...

  2. 大数据统计分析平台之二、ElasticSearch 6.2.1的安装与使用

    # 下载文件cd /usr/local/software wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch ...

  3. java中函数传值和传地址的问题

    记录一下这个难过的双休,2019.3.16-2019.3.17,16号上午字节跳动笔试,四道题只做出1道半,输入输出搞的半死,第三题类似于leetcode上的分糖问题,数组初始化的时候全部赋为0了,要 ...

  4. AGC001 E - BBQ Hard 组合数学

    题目链接 AGC001 E - BBQ Hard 题解 考虑\(C(n+m,n)\)的组合意义 从\((0,0)\)走到\((n,m)\)的方案数 从\((x,y)\)走到\((x+n,y+m)\)的 ...

  5. Codeforces.1045A.Last chance(最大流ISAP 线段树优化建图)

    题目链接 \(Description\) 你需要用给定的\(n\)个武器摧毁\(m\)架飞船中的某一些.每架飞船需要被摧毁恰好一次. 武器共三种:1.可以在给定的集合中摧毁一架飞船:2.可以摧毁区间\ ...

  6. BZOJ.1022.[SHOI2008]小约翰的游戏John(博弈论 Anti-Nim)

    题目链接 Anti-Nim游戏: 先手必胜当且仅当: 1.所有堆的石子数为1,且异或和为0 2.至少有一堆石子数>1,且异或和不为0 简要证明: 对于1:若异或和为1,则有奇数堆:异或和为0,则 ...

  7. 以为是tomcat出现using问题,怎么改都改不好终于找到原因

    我也是醉了被自己打败了,以上问题困扰我半天是时间,百度好久都没有解决.应该打开tomcat的bin下的starup.bat结果打开了tomcat-src中的了,怪不得死活出现不了startup

  8. centos 7 安装 php 5.5 5.6 7.0

    查看当前安装的PHP包 [root@node1 ~]# yum list installed | grep php php56w.x86_64 -.w7 @webtatic php56w-cli.x8 ...

  9. 在现实面前,IT从业者的无奈

    话题:在中国,有多少程序员干到40了? 作者:匿名用户 链接:https://www.zhihu.com/question/33953081/answer/349839986 学历低,计算机理论不高, ...

  10. linux系统下shell命令中的sleep

    在有的shell(比如linux中的bash)中sleep还支持睡眠(分,小时)sleep 1    睡眠1秒sleep 1s    睡眠1秒sleep 1m   睡眠1分sleep 1h   睡眠1 ...