Steam auth broken due to misconfigured external nginx

Hi, I just installed and enabled the plugin following the instruction. However I got 502 error at /auth/steam and /auth/steam?reconnect=true. Could someone help me fix this?

You’ll need to include some information from the logs with the errors.

I would

 tail -f /var/discourse/shared/standalone/log/rails/production.log

and see what you see there when you make the error happen

After clicking sign in with Steam, I see

Started GET "/session/csrf" for (IP address) at 2022-08-05 11:11:54 +0000
Processing by SessionController#csrf as JSON
Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 307)
Started POST "/auth/steam" for (IP address) at 2022-08-05 11:11:55 +0000
(steam) Setup endpoint detected, running now.
(steam) Request phase initiated.

and the error page appears.

That sounds like the 502 error is coming from steam and not Discourse. Does the network tab in the browser show the 502 error coming from Steam and not Discourse?

Hmm… I’m seeing this.
image

Does this mean that the error is coming from Discourse? I can successfully access Steam website by the way.

If that url is your forum then yes, it’s discourse and you didn’t send that info from the logs. That 502 should be logged

1 Like

Got it, that’s my forum. I found in the error log of Nginx:

2022/08/05 20:23:35 [notice] 1765588#1765588: signal process started
2022/08/05 20:23:56 [error] 1765590#1765590: *121361 upstream sent too big header while reading response header from upstream, client: (IP address), server: www.bfsu.cafe, request: "POST /auth/steam HTTP/2.0", upstream: "http://unix:/var/discourse/shared/standalone/nginx.http.sock:/auth/steam", host: "www.bfsu.cafe", referrer: "https://www.bfsu.cafe/login"

It seems that my Nginx isn’t properly configured. I might be able to solve this after my own search. Thanks for your help so far!

Update: added proxy_buffer_size 32k, solved. :white_check_mark:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.