OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: dinguz on December 27, 2024, 06:58:00 PM

Title: nginx: sendfile gets periodically disabled in main config
Post by: dinguz on December 27, 2024, 06:58:00 PM
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.
Title: Re: nginx: sendfile gets periodically disabled in main config
Post by: dinguz on January 01, 2025, 08:50:50 PM
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?
Title: Re: nginx: sendfile gets periodically disabled in main config
Post by: Patrick M. Hausen on January 01, 2025, 09:28:55 PM
Reporting it here is not guaranteed to reach any of the developers, although it frequently does. So best to create an issue on github.
Title: Re: nginx: sendfile gets periodically disabled in main config
Post by: dinguz on January 02, 2025, 11:41:49 AM
Done: https://github.com/opnsense/core/issues/8176 (https://github.com/opnsense/core/issues/8176)
Title: Re: nginx: sendfile gets periodically disabled in main config
Post by: dinguz on February 14, 2025, 01:25:02 PM
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?