Site updated: 2022-09-23 16:32:04

This commit is contained in:
qinglong
2022-09-23 16:32:05 +08:00
parent 194b35d844
commit e945303936
37 changed files with 91 additions and 35 deletions

View File

@ -6,6 +6,17 @@
"description": "hito的博客",
"home_page_url": "https://blog.jingxiyuan.cn",
"items": [
{
"id": "https://blog.jingxiyuan.cn/2022/09/23/%E8%A7%A3%E5%86%B3%E5%9F%9F%E5%90%8Dip%E5%8F%98%E5%8A%A8%E5%90%8E%E9%9C%80%E8%A6%81%E9%87%8D%E5%90%AFnginx%E7%9A%84%E9%97%AE%E9%A2%98/",
"url": "https://blog.jingxiyuan.cn/2022/09/23/%E8%A7%A3%E5%86%B3%E5%9F%9F%E5%90%8Dip%E5%8F%98%E5%8A%A8%E5%90%8E%E9%9C%80%E8%A6%81%E9%87%8D%E5%90%AFnginx%E7%9A%84%E9%97%AE%E9%A2%98/",
"title": "解决域名ip变动后需要重启nginx的问题",
"date_published": "2022-09-23T08:17:00.000Z",
"content_html": "<p><em>今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx想想都头大。于是查询资料后获得了解决办法方法如下</em></p>\n<pre><code class=\"language-yum\">location / &#123;\t\n\tresolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析\n\n\tset $my_server &quot;https://ip:port&quot;;\n\n\tproxy_pass $my_server;\n&#125;\n</code></pre>\n",
"tags": [
"技术分享",
"nginx"
]
},
{
"id": "https://blog.jingxiyuan.cn/2022/09/22/protobuf%E7%94%9F%E6%88%90js%E6%96%87%E4%BB%B6/",
"url": "https://blog.jingxiyuan.cn/2022/09/22/protobuf%E7%94%9F%E6%88%90js%E6%96%87%E4%BB%B6/",