이전에 URL을 입력 할 때 이것을 본 적이 있으면 http://test.com/test/html 페이지를 제공하는 대신 주어진 위치에있는 모든 파일을 탐색 할 수있는 인터페이스와 같은 '파일 브라우저'를 제공합니다.
위치 컨텍스트에서 사용할 수있는 nginx 모듈 일 수 있다고 생각합니다.
nginx.conf파일 :
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 122.97.248.252;
location /test {
root /home/yozloy/html/;
autoindex on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
업데이트 error.log
2012/05/19 20:48:33 [오류] 20357 # 0 : * 72 open () "/ home / yozloy / html / test"실패 (2 : 해당 파일 또는 디렉토리 없음), 클라이언트 : 125.43.236.33, 서버 : 122.97.248.252, 요청 : "GET / test HTTP / 1.1", 호스트 : "unicom2.markson.hk
위치 /test의미 를 오해해야합니다. http://example.com/test를 입력했을 때 의미한다고 생각 하면 루트 사전에 액세스합니다./home/yozloy/html/
