随笔分类 -  nginx

nginx 相关的
摘要:下面两个 location , (1)后面如果是 / ,访问的路径 : ip:端口/index.html 即可访问到 /usr/share/nginx/html/vue 下面的网页(2)如果后面有东西,访问的路径: ip:端口/app/dist/index.html 但是 nginx 找的路径,是: 阅读全文
posted @ 2022-09-27 23:06 雪化山河 阅读(5614) 评论(0) 推荐(0) 编辑
摘要:一般配置 https 需要一个证书对应一个域名,一个证书只能用于一个域名;但是有一种叫做“通配符证书”(英文叫:Wildcard certificate)的证书,可以一个证书,配置 n 个二级域名,例如: 一般的: www.baidu.com 通配符证书: *.baidu.com 然后 nginx 阅读全文
posted @ 2022-09-09 17:57 雪化山河 阅读(3230) 评论(0) 推荐(0) 编辑
摘要:无论哪种方式,如果其中有一台宕机了,请求会自动轮询到其余的服务器 (1)轮询方式: #轮询请求 upstream myserver { server 192.168.17.140:8081; server 192.168.17.141:8081; server 192.168.17.142:8081 阅读全文
posted @ 2022-07-24 19:43 雪化山河 阅读(33) 评论(0) 推荐(0) 编辑
摘要:* nginx 配置 ssl 证书前需要先安装 SSL 模块,本次操作是在已经安装 nginx 的基础上配置,先安装 SSL 模块,来到 nginx 源码目录,我的是这里,执行进入到自己的安装目录: cd /usr/local/nginx-1.10.3 执行语句,重新安装 ssl 模块 ./conf 阅读全文
posted @ 2022-05-25 00:11 雪化山河 阅读(1262) 评论(0) 推荐(0) 编辑
摘要:* 一键安装四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel * 安装 nginx【如果报:-bash: wget: command not found,先安装 wget:yum -y install w 阅读全文
posted @ 2022-05-23 21:43 雪化山河 阅读(619) 评论(0) 推荐(0) 编辑
摘要:一般 nginx 配置 https ,只要两个证书就可以了,但是有时候有一个中间证书的东西,也是和外面的公司对接才知道,具体配置如下: server { listen 443 ssl; server_name xxx.xxx.com; #rewrite ^(.*)$ https://$host$1; 阅读全文
posted @ 2021-03-18 11:51 雪化山河 阅读(1609) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示