nginx 目录浏览
1,配置文件 http 内增加 autoindex on;
http{ include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 100m; sendfile off; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; server_tokens off; autoindex on; autoindex_exact_size off; autoindex_localtime on; fastcgi_connect_timeout 60; fastcgi_send_timeout 60; fastcgi_read_timeout 60; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_intercept_errors on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; open_file_cache max=102400 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 1; proxy_ignore_client_abort on; log_format access_logs '[$time_local][$remote_addr][$status][$body_bytes_sent][$request][$remote_user][$http_referer][$http_user_agent][$http_x_forwarded_for]'; include hosts/*.conf; }