403禁止访问解决

、

重要:修改配置文件使用虚拟机,否则怎么配置都不生效,添加如下用户

[root@host---- html]# ll /etc/nginx/nginx.conf
-rw-r--r-- root root Aug : /etc/nginx/nginx.conf
[root@host---- html]# vi /etc/nginx/nginx.conf
user root root;
worker_processes ; 、 加上 index.php
index index.html index.php . 不要写成 test1.index.html 务必改成 index.html 多写个目录就多写几个目录 503访问错误解决 [root@host---- ~]# curl oa.test.com
<html>
<head><title> Bad Gateway</title></head>
<body bgcolor="white">
<center><h1> Bad Gateway</h1></center>
<hr><center>nginx/1.12.</center>
</body>
</html> 原因:防火墙没有关 解决: [root@host---- tomcat]# systemctl stop iptables
[root@host---- tomcat]# systemctl stop firewalld nginx [error] invalid PID number in varrunnginxnginx.pid” 解决 nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”
在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid" 解决办法: $ sudo nginx -c /usr/local/etc/nginx/nginx.conf $ sudo nginx -s reload nginx: [warn] conflicting server name "localhost" on 0.0.0.0:, ignored nginx: [warn] conflicting server name "localhost" on 0.0.0.0:, ignored
修改nginx配置参数后,使用nginx -t检查配置. 提示successfull后就可以使用 nginx -s reload来重新加载配置 nginx: [warn] conflicting server name "localhost" on 0.0.0.0:, ignored 意思是重复绑定了server name,但这个警告不会影响到服务器运行。 而且,这个重复绑定的意思是现在运行的nginx服务和将要加载的新配置中的重复

nginx服务报错解决的更多相关文章

  1. 类库文件引用web服务报错解决方法-在 ServiceModel 客户端配置部分中,找不到引用协定的默认终结点元素

    由于需求,需要改造原有应用,因原有应用是写在console下面的,现在需要开放至web下, 想到BIZ层应用代码都是一样的,又不想在web下在添加引用,而重复写代码,故将原有的console下的服务和 ...

  2. No input file specified. nginx服务器报错解决

    配置虚拟域名的时候报No input file specified. 仔细观察一圈也没有发现任何错误,最终,我把注意力放到 \ 上.才发现问题. 以前我都是直接copy文件路径过去 文件里面 都是使用 ...

  3. birt4.6部署到tomcat及启动服务报错解决方法

    一.下载birt-runtime-4.6.0-20160607.zip包 解压后birt-runtime-4.6.0-20160607\WebViewerExample将WebViewerExampl ...

  4. nginx 启动报错 “/var/run/nginx/nginx.pid" failed” 解决方法

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  5. nginx 使用HTTPS协议-SSL证书模块报错解决-附nginx安装 : [emerg] the "ssl" parameter requires ngx_http_ssl_module in nginx.c

    Linux系统下ngnix使用HTTPS协议启动报错: nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modul ...

  6. 重启虚拟机后,再次重启nginx会报错:[emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  7. Nginx 启动报错 “/var/run/nginx/nginx.pid" failed”

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  8. MySQL 启动服务报错解决方案

    标签:ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid) 概述 文章 ...

  9. FastDFS整合nginx后,nginx一直报错

    FastDFS整合nginx后,nginx一直报错: 报错内容: [2018-06-11 09:41:21] ERROR - file: ../common/fdfs_http_shared.c, l ...

随机推荐

  1. 全排列 递归方法(permutation原理

    https://blog.csdn.net/axiqia/article/details/50967863  原博客 (一)递归的全排列算法 (A.B.C.D)的全排列为 1.A后面跟(B.C.D)的 ...

  2. java中的io流总结(一)

    知识点:基于抽象基类字节流(InputStream和OutputStream).字符流(Reader和Writer)的特性,处理纯文本文件,优先考虑使用字符流BufferedReader/Buffer ...

  3. Java基础 IO流的文件和目录的五类主要操作

    笔记: /** IO流的 文件和目录的操作 * 1.路径需要 需要两个反斜杠 或者一个单斜杠! * 绝对路径:包括盘符在内的完整的路径名! * 相对路径:在当前目录文件下的路径! * 2.File 是 ...

  4. redis 订阅&发布(转载)

    https://segmentfault.com/a/1190000016898228?utm_source=coffeephp.com 方法一: redis_helper.py: 封装发布订阅方法 ...

  5. C#上传下载文件

    方法一.通过Ajax方式上传文件(input file),使用FormData进行Ajax请求 <div  > <input type="file" name=& ...

  6. 第六章 Flask数据库(一)之SQLAlchemy

    将ORM模型映射到数据库中 1. 用`declarative_base`根据`engine`创建一个ORM基类. from sqlalchemy.ext.declarative import decl ...

  7. P4461 [CQOI2018]九连环

    思路:\(DP\) 提交:\(2\)次 错因:高精写挂(窝太菜了) 题解: 观察可知\(f[i]=2*f[i-1]+(n\&1)\) 高精的过程参考了WinXP@luogu的思路: 发现一个问 ...

  8. BZOJ 1420 Discrete Root

    思路:数学大汇总 提交:\(3\)次 错因:有一个\(j\)写成\(i\) 题解: 求:\(x^k \equiv a \mod p\) 我们先转化一下:求出\(p\)的原根\(g\) 然后我们用\(B ...

  9. sql时间加减

    /时间转成年月日时分秒select date_format(now(),'%Y%m%d%H%i%S')//时间转成年月日select date_format(now(),'%Y%m%d')//去年此时 ...

  10. Comet OJ - Contest #2 (D 错综的光影所迷惑的思念是) 容斥计数

    题意:给定一颗 $n$ 个节点的树,定义 $dis(x,y)$ 为树上点 $x$ 到 $y$ 的路径经过的边数. 定义一个点集 $S$ 的 $f(S)$ 为 $f(S)=max\left \{dis( ...