사용자 도구

사이트 도구


nginx:location

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
nginx:location [2014/01/22 16:40]
kwon37xi
nginx:location [2019/06/26 21:24] (현재)
kwon37xi
줄 49: 줄 49:
  
 ===== Directory Listing 디렉토리 목록 ===== ===== Directory Listing 디렉토리 목록 =====
-  * [[http://nginxlibrary.com/enable-directory-listing/|Enable directory listing]]<code>+[[http://nginxlibrary.com/enable-directory-listing/|Enable directory listing]] 
 + 
 +<code>
 location /somedir { location /somedir {
     autoindex on;     autoindex on;
 } }
 </code> </code>
 +
 +===== internal =====
 +[[http://wiki.nginx.org/HttpCoreModule#internal|internal]]은 특정 location이 nginx 내부 요청에서만 유효하고 외부 요청에서는 404로 응답하도록 한다. 에러 페이지 등에 사용하면 좋다.
 +<code>
 +error_page 404 /404.html;
 +location  /404.html {
 +  internal;
 +}
 +</code>
 +
 +내부 요청은 다음과 같은 것들을 의미한다.
 +  * ''error_page''로 인해 발생한 요청
 +  * ''ngx_http_ssi_module'' 모듈의 ''include virtual'' 명령에 의한 요청
 +  * ''ngx_http_rewrite_module''의 ''rewrite'' 명령에 의해 변경된 요청
 +
 +
 +===== 참조 =====
 +  * [[https://ohgyun.com/480|꿀벌개발일지 :: Nginx HTTP Server - 4. HTTP 환경설정]] location 설정 패턴에 대한 설명이 자세함.
  
nginx/location.1390376405.txt.gz · 마지막으로 수정됨: 2014/01/22 16:40 저자 kwon37xi