备份博文内容

This commit is contained in:
YuCheng Hu 2025-05-16 03:13:20 +08:00
parent 8d348b5fa2
commit 016e264950
No known key found for this signature in database
GPG Key ID: 6685280F6FDE8141

View File

@ -0,0 +1 @@
<p>错误的信息为:</p> <br><p></p> <br><pre><code>nginx: [emerg] "upstream" directive is not allowed here <br></code></pre> <br><h3>原因和解决</h3> <br><p>这里的原因是改了配置文件upstream存的的位置不对所以导致报错的。</p> <br><p>需要把 <strong>upstream</strong> 放入http 里面保存重启nginx就解决了。</p> <br><p></p> <br><p></p> <br><p class="img-center"><a href="https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/6/b/6b9334ceb98bd12cdfb4851b186bae4a58637b33.jpeg" rel="nofollow"><img alt="2025-05-15_10-55-31" height="82" src="https://i-blog.csdnimg.cn/img_convert/63cfec3faa3cc0fa460ae10805ed5ae5.jpeg" width="690" /></a></p> <br><p></p> <br><p></p> <br><p><a class="has-card" href="https://www.isharkfly.com/t/nginx-upstream/17299" rel="nofollow" title="Nginx 配置文件提示 upstream 路径错误 - DevOps - iSharkFly"><span class="link-card-box" contenteditable="false"><span class="link-title">Nginx 配置文件提示 upstream 路径错误 - DevOps - iSharkFly</span><span class="link-desc">错误的信息为: nginx: [emerg] "upstream" directive is not allowed here 原因和解决这里的原因是改了配置文件upstream存的的位置不对所以导致报错的。 需要把 upstream 放入http 里面保存重启nginx就解决了。</span><span class="link-link"><img class="link-link-icon" src="https://csdnimg.cn/release/blog_editor_html/release2.3.9/ckeditor/plugins/CsdnLink/icons/icon-default.png?t=P4F5" />https://www.isharkfly.com/t/nginx-upstream/17299</span></span></a></p> <br><p></p> <br><p></p> <br><p></p>