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. Java基础 TreeSet()来实现数组的【定制排序】 : Comparable接口(自然排序) 或者 Comparator接口 (定制排序)

    笔记: //排序真麻烦!没有C++里的好用又方便!ORZ!ORZ!数组排序还还自己写个TreeSet()和( Comparable接口(自然排序) 或者 Comparator接口 (定制排序))imp ...

  2. 文件已经传输过来,数据在data,http接收

  3. 一个基于TCP/IP的小项目,实现广播消息的功能。(超详细版)

    1.结合现状 功能分析 该功能基于上个项目的改进,主要是通过对服务器端代码的修改,以及对客户端作少许修改,实现开启多客户端时,一个客户端发送消息,达到对所有客户端广播的效果.可参考网吧里的点歌系统,比 ...

  4. Nginx中ngx_http_auth_basic_moudel和ngx_http_stub_status_module模块

    ngx_http_auth_basic_module实现基于⽤用户的访问控制,使⽤用basic机制进⾏行行⽤用户认证指令:5.1 auth_basicSyntax: auth_basic string ...

  5. vue中使用ckeditor,支持wps,word,网页粘贴

    由于工作需要必须将word文档内容粘贴到编辑器中使用 但发现word中的图片粘贴后变成了file:///xxxx.jpg这种内容,如果上传到服务器后其他人也访问不了,网上找了很多编辑器发现没有一个能直 ...

  6. learning express step(八)

    To skip the rest of the middleware functions from a router middleware stack, call next('route') to p ...

  7. SpingMVC入门

    Springmvc简介及配置 1. 什么是springMVC? Spring Web MVC是一种基于Java的实现了MVC设计模式的.请求驱动类型的.轻量级Web框架. 2. SpringMVC处理 ...

  8. CF350E Wrong Floyd

    洛谷题目链接 前言: 这题其实真的不难 回归正题: 我们首先要明白$floyd$的思想,相信你都来做这道水题了,肯定不陌生,简单的手玩后,我们可以发现: 只要有任意一个点只跟非标记点相连的话,是更新不 ...

  9. Java进阶知识18 Spring对象依赖关系的几种写法

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  10. 51nod 1086

    https://www.cnblogs.com/TnT2333333/p/6879709.html 二进制优化多重背包 怎么用二进制优化多重背包,举一个例子就明白了. 如果要放n个苹果,可以将n个苹果 ...