Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx: 'enable sendfile' checkbox in Global HTTP settings isn't honoured #4436

Open
2 tasks done
dinguz opened this issue Jan 2, 2025 · 0 comments
Open
2 tasks done

Comments

@dinguz
Copy link

dinguz commented Jan 2, 2025

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

The 'enable sendfile' checkbox isn't being honoured. The generated nginx config file always has sendfile globally disabled. The checkbox itself gets cleared after some time.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Services - Nginx - Configuration - General Settings - Global HTTP settings
  2. Tick 'enable sendfile' checkbox and apply
  3. Go to Other - Config preview, select Show Config and confirm
  4. Go to section after '# 200M should be big enough for file servers etc.' and observe sendfile set to off

Expected behavior

The aforementioned sendfile being set in accordance with the checkbox on the configuration page

Describe alternatives you considered

A clear and concise description of any alternative solutions or workaround you considered.

Screenshots

If applicable, add screenshots to help explain your problem.

Relevant log files

If applicable, information from log files supporting your claim.

Additional context

I believe this to be 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.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 24.7.11_2-amd64

@AdSchellevis AdSchellevis transferred this issue from opnsense/core Jan 2, 2025
kulikov-a added a commit to kulikov-a/plugins that referenced this issue Jan 12, 2025
multiple client auth CA support (opnsense#4421)
HTTP/2 server checkbox (opnsense#4272)
sendfile form typo (opnsense#4436)
kulikov-a added a commit to kulikov-a/plugins that referenced this issue Jan 12, 2025
proxy_intercept_errors support (opnsense#4224)
multiple client auth CA support (opnsense#4421)
HTTP/2 server checkbox (opnsense#4272)
sendfile form typo (opnsense#4436)
variables  hashes (opnsense#4360)
kulikov-a added a commit to kulikov-a/plugins that referenced this issue Jan 13, 2025
proxy_intercept_errors support (opnsense#4224)
multiple client auth CA support (opnsense#4421)
HTTP/2 server checkbox (opnsense#4272)
sendfile form typo (opnsense#4436)
variables  hashes (opnsense#4360)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant