by reipahb · 10y ago · 0 comments
That allows "/" to be used for other purposes, e.g. redirecting to the main page of the site, or displaying a nice error page. (However, in this case it simply shows the default Debian Nginx installation page: http://m.charlesleifer.com/ )
location = / {
# Just whatever happens for "/" requests goes here
}
location / {
# Every other requests ends up here
} location = / { [ configuration A ] }
location / { [ configuration B ] }
To learn more about this, I recommend http://nginx.org/en/docs/http/ngx_http_core_module.htmlThe Nginx docs are not always great but they are far more correct than most blog posts about Nginx so that is why I have turned to use only the official docs when I have a question about how to do something with Nginx.