# Digital Ocean 中使用 Nginx 重定向 URL

**URL:** <https://meta.discourse.org/t/redirect-url-with-nginx-in-digital-ocean/235297>\
**Category:** Self-hosting\
**Created:** [2022 年8 月 6 日 09:10 UTC](https://meta.discourse.org/t/redirect-url-with-nginx-in-digital-ocean/235297 "2022-08-06T09:10:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
发布日期： [2022 年8 月 6 日 14:10 UTC](https://meta.discourse.org/t/redirect-url-with-nginx-in-digital-ocean/235297/4 "2022-08-06T14:10:40Z")

</div>

最佳解决方案是更新迁移脚本，以便为您创建永久链接重定向。

不要直接配置 nginx，因为每次重建容器进行升级时，这些更改都将被销毁。

相反，请按照 @pfaffman 的建议编辑 app.yml 以修改 nginx 配置。

---

_[View the full topic](https://meta.discourse.org/t/redirect-url-with-nginx-in-digital-ocean/235297)._
