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. c信号量操作demo

    #include <stdio.h> #include <string.h> #include <sys/ipc.h> #include <sys/sem.h ...

  2. 前端知识体系:JavaScript基础-原型和原型链-理解 es6 中class构造以及继承的底层实现原理

    理解 es6 中class构造以及继承的底层实现原理 原文链接:https://blog.csdn.net/qq_34149805/article/details/86105123 1.ES6 cla ...

  3. BZOJ 2127 / Luogu P1646 [国家集训队]happiness (最小割)

    题面 BZOJ传送门 Luogu传送门 分析 这道题又出现了二元关系,于是我们只需要解方程确定怎么连边就行了 假设跟SSS分在一块是选文科,跟TTT分在一块是选理科,先加上所有的收益,再来考虑如何让需 ...

  4. 题解 [JOI 2019 Final] 独特的城市

    题面 解析 首先有一个结论, 对一个点\(x\)有贡献的城市 肯定在它到离它较远的直径的端点的链上. 假设离它较远的端点是\(S\), 如果有一个点\(u\)不在\(x\)到\(S\)的链上, 却对\ ...

  5. 使用谷歌chrome浏览器查看任何标签的固有属性

    查看任何标签的固有属性property: 使用谷歌浏览器:Ctrl+Shift+I 开发者工具----点击Elements----点击a标签----点击Properties属性及其属性值. 自定义属性 ...

  6. IDEA创建类似于Eclipse的source folder

    1.新建普通文件夹目录directory 2.当前Module右键Open Mudule Settings(F12) 3.选中新建的文件夹并单击上面的Sources,看到文件夹颜色变化即成功.

  7. prometheus简单监控Linux,mysql,nginx

    prometheus安装 下载安装 #官网下载 解压即可使用 https://prometheus.io/download/ #docker 方式安装 sudo docker run -n prome ...

  8. CComboBoxEx添加图像CImageList无法正常显示

    <1>给控件 CComboBox绑定变量 .cpp中 DDX_Control(pDX, IDC_COMBO_PHOTO_IMG, m_ComboBoxPhotoImg); CComboBo ...

  9. kubernetes案例 tomcat+mysql

    该文章参考<kubernetes 权威指南> 环境: [root@master tomcat-mysql]# kubectl get nodesNAME      STATUS    AG ...

  10. ASP.NET的MVC设计模式

    当开发者听到“设计模式”这个词时,他们通常联想到两个场景.一组开发者正在讨论许多创造性意见,正在开会,但是却没有进行编码.另外一组人能制定出正确的计划,保证系统能够开发成功,代码可以重用. 而现实一般 ...