nginx: sendfile gets periodically disabled in main config

Started by dinguz, December 27, 2024, 06:58:00 PM

Previous topic - Next topic
I have been playing around with nginx as a reverse proxy, and noticed something peculiar: every time I enable sendfile support in the main config page, it gets disabled automatically after some time. Is this expected behavior?
I have it enabled in the individual HTTP server entries as well.
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

January 01, 2025, 08:50:50 PM #1 Last Edit: January 01, 2025, 08:52:28 PM by dinguz Reason: clarification
I believe I have found the cause, in this file:

/usr/local/opnsense/mvc/app/controllers/OPNsense/Nginx/forms/settings.xml
this section is incorrect:

<field>
    <id>nginx.http.enabled</id>
    <label>Enable sendfile</label>
    <type>checkbox</type>
    <help>Enable sendfile support (faster).</help>
  </field>

it should read:

<field>
    <id>nginx.http.sendfile</id>
    <label>Enable sendfile</label>
    <type>checkbox</type>
    <help>Enable sendfile support (faster).</help>
  </field>

This naming mismatch causes the checkbox to be ineffective.
Would reporting it here be sufficient, or is official bug report in order?
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

Reporting it here is not guaranteed to reach any of the developers, although it frequently does. So best to create an issue on github.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.

When checking in on this, I noticed fixes for this issue have been committed in Github by 'kulikov-a', towards nginx 1.35 (current version is 1.34_6).
When will this version be included in OPNsense? Do I need to request an update somewhere?
Note: This post may have been lightly edited by AI for spelling and minor readability improvements. The content and findings are entirely my own.