Difference between revisions of "Nginx"

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Made note that nginx directives are case-sensitive (based on quick testing of location/LOCATION directive))
m (Placed subpages at the top so I could quit worrying about the transclusion messing with the parser cache (bug) and also moved inline references to reference section.)
Line 5: Line 5:
  
 
{{WorkInProgress}}
 
{{WorkInProgress}}
 +
 +
== Subpages ==
 +
 +
{{Special:PrefixIndex/Nginx/}}
  
  
 +
== nginx is thorny ==
  
 
I've been using Nginx for a few years now and plan to do so for many more, but it wasn't an easy setup to get used to. In fact, I'm still getting bit by the differences between it and [[Apache]], which I have much more experience with. The one difference that stands out the most to me is the <code>location</code> blocks.
 
I've been using Nginx for a few years now and plan to do so for many more, but it wasn't an easy setup to get used to. In fact, I'm still getting bit by the differences between it and [[Apache]], which I have much more experience with. The one difference that stands out the most to me is the <code>location</code> blocks.
  
For the most part, [[Apache]] directives are matched in a top down manner with later directives overwriting earlier ones if duplicated. Nginx directives on the other hand seem to operate a little differently. One such example is that with [[Apache]], directives in the configuration files are case-insensitive, but with nginx, directives are case-sensitive.
+
For the most part, [[Apache]] directives are matched in a top down manner with later directives overwriting earlier ones if duplicated. Nginx directives on the other hand seem to operate a little differently. One such example is that with [[Apache]], directives in the configuration files are case-insensitive <ref name="apache-directives" />, but with nginx, directives are case-sensitive.
 
 
== Subpages ==
 
  
{{Special:PrefixIndex/Nginx/}}
+
{{InfoBox|warning|Pay close attention to what version of nginx a book or web resource is based on as behavior may change between releases <ref name="prefix-none" />}}
  
{{InfoBox
 
|warning
 
|Pay close attention to what version of nginx a book or web resource is based on as behavior may change between releases <ref name="prefix-none">[http://nginx.org/en/docs/http/ngx_http_core_module.html#location In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the "=" and "^~" prefixes, the search also terminated and regular expressions were not checked.]</ref>
 
}}
 
  
  
Line 31: Line 30:
 
==== References ====
 
==== References ====
  
<references />
+
<references>
 +
<ref name="prefix-none">[http://nginx.org/en/docs/http/ngx_http_core_module.html#location In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the "=" and "^~" prefixes, the search also terminated and regular expressions were not checked.]</ref>
 +
<ref name="apache-directives">[http://httpd.apache.org/docs/2.2/configuring.html Apache 2.2.x Configuration Files]</ref>
 +
</references>
 +
 
  
 
==== Changelogs ====
 
==== Changelogs ====

Revision as of 17:34, 25 August 2012




The following content is a Work In Progress and may contain broken links, incomplete directions or other errors. Once the initial work is complete this notice will be removed. Please contact me via Twitter with any questions and I'll try to help you out.


Subpages


nginx is thorny

I've been using Nginx for a few years now and plan to do so for many more, but it wasn't an easy setup to get used to. In fact, I'm still getting bit by the differences between it and Apache, which I have much more experience with. The one difference that stands out the most to me is the location blocks.

For the most part, Apache directives are matched in a top down manner with later directives overwriting earlier ones if duplicated. Nginx directives on the other hand seem to operate a little differently. One such example is that with Apache, directives in the configuration files are case-insensitive [1], but with nginx, directives are case-sensitive.


Pay close attention to what version of nginx a book or web resource is based on as behavior may change between releases [2]



Additional Info


References


Changelogs


Books

nginx versions covered (Jun 2010)
Stable Dev Legacy
0.7.66 0.8.40 0.5.38, 0.6.39