Wednesday, 29 July 2026

Home-lab design (2026 edition) part 4 - More NGinx Proxy tweaks

After putting [NGinx Proxy Manager](https://nginxproxymanager.com/) in front of [ALL THE THINGS](https://blog.themillhousegroup.com/2026/04/home-lab-design-2026-edition-part-3.html) I'm still tuning a few little quirks that have resulted. One of the ones that I didn't notice for a while was the proxy in front of my Mikrotik router. While it works, when using the router's web console, the session times out *extremely quickly* (like 60 seconds) which is tiresome. Comparing the network traffic when hitting the router directly:
versus via the proxy:
the cause is very clear. The `jsproxy` endpoint gets regularly called, and the version going via the proxy is getting a truncated response compared to the "direct" version. Clearly the UI has some tolerance for this, but then decides to end the session after getting too many unacceptable responses in a row. Let's fix it! First, let's give NPM enough buffers to not truncate those responses - in the advanced configuration of the NPM proxy entry for the Mikrotik: ``` proxy_buffer_size 16k; proxy_buffers 4 16k; proxy_busy_buffers_size 16k; ``` OK so that's now fixed:
.. but the session still times out after 60 seconds! We also need to add some extra proxy controls so that NPM keeps the connection open: ``` proxy_connect_timeout 36000s; proxy_send_timeout 36000s; proxy_read_timeout 36000s; ``` ... and now we have a fully-working Mikrotik proxy!

No comments:

Post a Comment

Comments welcome - spam is not. Spam will be detected, deleted and the source IP blocked.