Page MenuHomeSolus

Update nginx to 1.18.0
ClosedPublic

Authored by livingsilver94 on Mar 31 2020, 8:10 PM.

Details

Summary
  • Feature: the "auth_delay" directive.
  • Change: now nginx does not allow several "Host" request header lines.
  • Bugfix: nginx ignored additional "Transfer-Encoding" request header lines.
  • Bugfix: socket leak when using HTTP/2.
  • Bugfix: a segmentation fault might occur in a worker process if OCSP stapling was used.
  • Bugfix: in the ngx_http_mp4_module.
  • Bugfix: nginx used status code 494 instead of 400 if errors with code 494 were redirected with the "error_page" directive.
  • Bugfix: socket leak when using subrequests in the njs module and the "aio" directive.

Package changes:

  • Make it stateless
  • Show a welcome website when no sites are available
  • Load config files from /etc/nginx/conf.d/ and /etc/nginx/sites-enabled/

Fixes T4780.

Test Plan
  1. With sites-available empty, welcome website is shown
  2. sudo touch /etc/nginx/sites-available/test
  3. Reboot nginx. Error 404 is shown on localhost, i.e. it's not loading welcome.conf anymore as expected
  4. sudo cp /usr/share/nginx/welcome.conf /etc/nginx/sites-enabled; sudo rm /tmp/nginx.conf
  5. Reboot nginx. Welcome website is shown as expected

Diff Detail

Repository
R2166 nginx
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

livingsilver94 created this revision.Mar 31 2020, 8:10 PM
livingsilver94 requested review of this revision.Mar 31 2020, 8:10 PM

Fix leftovers

JoshStrobl requested changes to this revision.Apr 1 2020, 12:27 PM
JoshStrobl added a subscriber: JoshStrobl.

Good start. I find the nginx.conf to be a serious regression however. You're stripping out a bunch of otherwise useful comments and default code blocks that can be utilized as a basis for setting up local configurations, and you're switching it from tabs to spaces.

package.yml
55

The /etc directories shouldn't be created by default. The point is to be able to eventually nuke /etc altogether to effective reset your packages back to vendor configuration.

This revision now requires changes to proceed.Apr 1 2020, 12:27 PM

you're switching it from tabs to spaces

I was using tabs, idk what converted them ._.
Anyways, alright! Fixes incoming in the next hours.

Fix things. Tests were repeated.

livingsilver94 marked an inline comment as done.Apr 1 2020, 9:22 PM
livingsilver94 edited the summary of this revision. (Show Details)Apr 1 2020, 9:28 PM

Since /etc is not provided inside the package, I could patch the Welcome website to show some doc, if you wish.

Since /etc is not provided inside the package, I could patch the Welcome website to show some doc, if you wish.

I think like with the httpd article on the Help Center, we should get one put together on nginx, and likely just link it in a welcome page. I can get all of that put together in the next few days when I'm not busy with work, or if you want and have the time, you are welcome to write the article detailing that nginx is stateless, a basic summary of what that actually means, and what the appropriate steps are for configuration nginx.

I'm not seeing any issue with the changes you've made now. Seriously, excellent work.

I'm writing the nginx Help Center article. Should be ready tomorrow :)

Edit welcome page

No commercial support for nginx. We're not a server distro

JoshStrobl accepted this revision.Apr 10 2020, 7:30 AM

LGTM, thanks for the patch including the work you put into the one to load the welcome page. Will merge this in once doc is landed ๐Ÿ‘

This revision is now accepted and ready to land.Apr 10 2020, 7:30 AM

Update to 1.18.0

livingsilver94 retitled this revision from Update nginx to 1.17.9 to Update nginx to 1.18.0.Apr 22 2020, 6:44 PM
livingsilver94 edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.