Site updated: 2022-09-23 16:32:04
This commit is contained in:
20
atom.xml
20
atom.xml
@ -8,7 +8,7 @@
|
||||
<author>
|
||||
<name>Hito li</name>
|
||||
</author>
|
||||
<updated>2022-09-22T02:30:00.000Z</updated>
|
||||
<updated>2022-09-23T08:17:00.000Z</updated>
|
||||
<category term="hito" />
|
||||
<category term="無言" />
|
||||
<category term="博客" />
|
||||
@ -16,6 +16,24 @@
|
||||
<category term="笔记" />
|
||||
<category term="心得体会" />
|
||||
<category term="踩坑" />
|
||||
<entry>
|
||||
<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/</id>
|
||||
<title>解决域名ip变动后需要重启nginx的问题</title>
|
||||
<link rel="alternate" href="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/"/>
|
||||
<content type="html"><p><em>今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx,想想都头大。于是查询资料后获得了解决办法,方法如下:</em></p>
|
||||
<pre><code class="language-yum">location / &#123;
|
||||
resolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析
|
||||
|
||||
set $my_server &quot;https://ip:port&quot;;
|
||||
|
||||
proxy_pass $my_server;
|
||||
&#125;
|
||||
</code></pre>
|
||||
</content>
|
||||
<category term="技术分享" scheme="https://blog.jingxiyuan.cn/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" />
|
||||
<category term="nginx" scheme="https://blog.jingxiyuan.cn/tags/nginx/" />
|
||||
<updated>2022-09-23T08:17:00.000Z</updated>
|
||||
</entry>
|
||||
<entry>
|
||||
<id>https://blog.jingxiyuan.cn/2022/09/22/protobuf%E7%94%9F%E6%88%90js%E6%96%87%E4%BB%B6/</id>
|
||||
<title>protobuf生成js文件</title>
|
||||
|
Reference in New Issue
Block a user