首页
关于
统计
留言
友链
视频
更多
直播
壁纸
推荐
短网址
图床
下载
Search
1
最新DD Windows 一键脚本,含Win精简版+完整版
2,525 阅读
2
解决Telegram电报“只能给双向联系人发送消息”的错误信息
1,954 阅读
3
解决Xshell无法启动,双击没反应打不开问题
1,634 阅读
4
富士施乐Xerox S2110 网络打印IP地址设置方法
1,474 阅读
5
宝塔限制国内IP访问网站设置方法
1,348 阅读
【推荐】
Linux
shell
建站
电脑
Win
Mac
网络
维修
打印机
软件工具
优惠活动
其他
生活
登录
Search
标签搜索
Linux
CentOS7
Win7
win10
dos
DNS
打印机
CentOS
Nginx
NTP
防火墙
Chrome
Ubuntu
github
git
宝塔
linux面板
Discuz
论坛
注册表
记录两年半
累计撰写
85
篇文章
累计收到
1
条评论
首页
栏目
【推荐】
Linux
shell
建站
电脑
Win
Mac
网络
维修
打印机
软件工具
优惠活动
其他
生活
页面
关于
统计
留言
友链
视频
直播
壁纸
推荐
短网址
图床
下载
搜索到
4
篇与
Nginx
的结果
2023-03-21
Nginx禁止ip访问或非法域名访问
在生产环境中,为了网站的安全访问,需要Nginx禁止一些非法访问,如恶意域名解析,直接使用IP访问网站。1)禁止IP访问如果没有匹配上server name就会找default默认,返回403错误。server { listen 80 default_server; server_name _; return 403; }2)通过301跳转到主页server { listen 80 default_server; server_name _; rewrite ^(.*) https://www.cingetech.com/$1 permanent; }3)凡是请求demo.cingetech.com 都跳转到后面域名www.cingetech.com上。(需要放到server配置里)if ($host ~ '^demo.cingetech.com'){ return 301 https://www.cingetech.com$request_uri; }
2023年03月21日
115 阅读
0 评论
0 点赞
2023-02-17
Failed to start LSB: starts the nginx web server. 解决方法
linux下 nginx 报错 Failed to start LSB: starts the nginx web server.查询nginx主进程号1、命令:ps -ef | grep nginxps -ef | grep nginx2、 kill 重复的进程- 命令killkill 296693、重启nginxsystemctl restart nginx systemctl status nginx4、OK,一切恢复正常!
2023年02月17日
643 阅读
0 评论
0 点赞
2022-11-12
Nginx一个server配置多域名多ssl证书
多域名多证书可以使用多个server 多个子配置文件进行设置并且方便管理还有一种就是一个server设置多个域名和ssl证书看图 因为80端口不涉及证书 所以这里以443端口为例server_name 中第二个域名与第一个域名之间以空格隔开,再复制一份 ssl_certificate ; 和 ssl_certificate_key ;输入第二个域名的证书文件地址即可。
2022年11月12日
658 阅读
0 评论
0 点赞
2022-03-30
CentOS 7下安装Nginx
一、配置 EPEL 源yum install -y epel-release二、安装 Nginxyum install -y nginx安装成功后,默认的网站目录为: /usr/share/nginx/html默认的配置文件为:/etc/nginx/nginx.conf自定义配置文件目录为: /etc/nginx/conf.d/三、开启端口 80 和 443如果你的服务器打开了防火墙,你需要运行下面的命令,打开 80 和 443 端口。firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload四、操作 Nginx# 1.启动 Nginx systemctl start nginx # 2.停止 Nginx systemctl stop nginx # 3.重启 Nginx systemctl restart nginx # 4.查看 Nginx 状态 systemctl status nginx # 5.开机启动 Nginx systemctl enable nginx # 6.禁用开机启动 Nginx systemctl disable nginx输入IP或者域名到浏览器,打开页面如下:
2022年03月30日
57 阅读
0 评论
0 点赞