사용자 도구

사이트 도구


nginx:location

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
nginx:location [2013/01/05 16:09]
kwon37xi [URL 중간에 정규표현식 있고, 특정 파일로 무조건 보내기]
nginx:location [2014/01/22 16:40]
kwon37xi
줄 6: 줄 6:
 <code> <code>
 location /images/something/ { location /images/something/ {
-    alias /var/www/something/+    alias /var/www/something/;
 } }
 </code> </code>
줄 28: 줄 28:
 ===== URL 중간에 정규표현식 있고, 특정 파일로 무조건 보내기  ===== ===== URL 중간에 정규표현식 있고, 특정 파일로 무조건 보내기  =====
 <code> <code>
-   location ~* ^/some/([0-9a-zA-Z\-_]+)/test { +location ~* ^/some/([0-9a-zA-Z\-_]+)/test { 
-    root /var/html; +  rewrite .* /somefile.html; 
-    rewrite .* /somefile.html;+
 + 
 +location ~ /somefile.html { 
 +  root /var/www/html; 
 +
 +</code> 
 + 
 +===== POST redirect ===== 
 +<code> 
 +location ~^/some/test { 
 +  return 302 /somefile.html
 +
 + 
 +location ~ /somefile.html { 
 +  root /var/www/html; 
 +
 +</code> 
 + 
 +===== Directory Listing 디렉토리 목록 ===== 
 +[[http://nginxlibrary.com/enable-directory-listing/|Enable directory listing]] 
 + 
 +<code> 
 +location /somedir { 
 +    autoindex on;
 } }
 </code> </code>
  
nginx/location.txt · 마지막으로 수정됨: 2019/06/26 21:24 저자 kwon37xi