首页 技术 正文
技术 2022年11月14日
0 收藏 948 点赞 4,537 浏览 1196 个字
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 firewalldnginx [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 reloadnginx: [warn] conflicting server name "localhost" on 0.0.0.0:, ignorednginx: [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服务和将要加载的新配置中的重复
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,088
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,564
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,412
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,185
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,822
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905