1.研发过程中有时会要求配置通过nginx访问静态资源文件
nginx.conf配置入下
autoindex on;# 显示目录
autoindex_exact_size on;# 显示文件大小
autoindex_localtime on;# 显示文件时间
server {
listen 8090;
listen [::]:8090;
server_name _;
location / {
root/data/fastdfs/storage/store_path;
}
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
2.配置后的效果入下