== http core module ==
=== location ===
<syntaxhighlight lang="nginx">
Syntax: location [ = | ~ | ~* | ^~ ] uri { ... }
location @name { ... }
Default: —
Context: server, location
</syntaxhighlight>
==== 예제 ====
<syntaxhighlight lang="nginx">
location = / {
[ configuration A ]
}
location / {
[ configuration B ]
}
location /documents/ {
[ configuration C ]
}
location ^~ /images/ {
[ configuration D ]
}
location ~* \.(gif|jpg|jpeg)$ {
[ configuration E ]
}
</syntaxhighlight>“/” 를 요청하면 설정A가 매칭될 것이다.
“/index.html” 을 요청하면 설정B가 매칭될 것이다.
“/documents/document.html”을 요청하면 설정C가 매칭될 것이다.
“/images/1.gif”를 요청하면 설정D가 매칭될 것이다.
“/documents/1.jpg”를 요청하면 설정E가 매칭될 것이다.
== 보안설정 ==
<nowiki>#</nowiki>/etc/nginx/nginx.conf