Page MenuHomePhabricator

Update nginx configuration documentation.
ClosedPublic

Authored by joshuaspence on Jun 6 2014, 12:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 1:06 AM
Unknown Object (File)
Wed, Nov 20, 8:25 PM
Unknown Object (File)
Wed, Nov 20, 6:12 PM
Unknown Object (File)
Sun, Nov 17, 4:30 AM
Unknown Object (File)
Oct 24 2024, 2:25 AM
Unknown Object (File)
Oct 20 2024, 12:00 PM
Unknown Object (File)
Oct 20 2024, 11:19 AM
Unknown Object (File)
Oct 19 2024, 4:05 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP3219039575fe: Update nginx configuration documentation.
Summary

The configuration guide for nginx recommends using a conditional statement to check if a file exists, which is listed on the nginx wiki as a common pitfall. It is not necessary to use a conditional and probably should not be recommended to do so.

Test Plan

We use this nginx configuration in our installation.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Update nginx configuration documentation..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

I think we should actually remove the "serve from disk" parts entirely (except for favicon.ico, although ideally this should be routed as well). At best, you get files which aren't transformed properly (for example, the ".css" files on disk aren't valid CSS, since they have color variables in them, and serving them directly is strictly wrong and will never work) and don't have the right caching headers. This has also caused some developer confusion in the past, e.g. when we added webfonts things that were wrong appeared to work correctly in a couple of edge cases.

(Far in the past I think we used a mixture of Celerity and non-celerity stuff to serve content, but all files we serve except favicon.ico should now be handled by Celerity.)

Let's remove everything except the favicon.ico rule, and then we can get rid of that eventually too?

This revision now requires changes to proceed.Jun 7 2014, 7:00 PM
joshuaspence edited edge metadata.
  • Don't server /rsrc/ directly from disk.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 7 2014, 7:08 PM
epriestley updated this revision to Diff 22488.

Closed by commit rP3219039575fe (authored by @joshuaspence, committed by @epriestley).

src/docs/user/configuration/configuration_guide.diviner
95–96

Oh, is this = extraneous?

src/docs/user/configuration/configuration_guide.diviner
95–96

No. It basically acts like a priority that tells nginx to stop trying to match locations.

From the documentation:

Also, using the “=” modifier it is possible to define an exact match of URI and location. If an exact match is found, the search terminates.