# 用户在 Nginx 设置后无法登录

**URL:** https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088
**Category:** Self-hosting
**Tags:** nginx
**Created:** [2026年一月22日 11:13 UTC](https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088 "2026-01-22T11:13:06Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![1vernit3](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/1vernit3/32/539886_2.png) [@1vernit3](https://meta.discourse.org/u/1vernit3)
#### Post date: [2026年一月23日 18:34 UTC](https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088/2 "2026-01-23T18:34:53Z")

</div>

添加了这些——现在可以正常工作了。  
`proxy_set_header X-Forwarded-Scheme https;`  
`proxy_set_header X-Forwarded-Host $host;`  
`proxy_set_header X-Forwarded-Port 443;`

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/6/b/c6b68e6fb87d8a3d188908f717646ce6bb1ff1c9.png)

---

_[View the full topic](https://meta.discourse.org/t/users-can-t-log-in-after-nginx-setup/394088)._
