Nginx配置:
#图片预览
server {
listen 82;
server_name imgview;
charset utf-8;# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;location /view {
# 本地资源目录
alias /home/files;
expires 1d;
}error_page 404 /404.html;
location = /40x.html {
}error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
资源访问地址: