1 配置浏览器访问文件
文件可以直接在浏览器中打开而不是下载
nginx
location /logs {
alias /docker/mes/logs;
autoindex on; #开启nginx目录浏览功能
autoindex_exact_size off; #文件大小从KB开始显示
autoindex_localtime on; #显示文件修改时间为服务器本地时间
charset utf-8; # 设置字符编码为UTF-8
types {
text/plain log;
text/plain txt;
}
default_type text/plain;
}
location /logs {
alias /docker/mes/logs;
autoindex on; #开启nginx目录浏览功能
autoindex_exact_size off; #文件大小从KB开始显示
autoindex_localtime on; #显示文件修改时间为服务器本地时间
charset utf-8; # 设置字符编码为UTF-8
types {
text/plain log;
text/plain txt;
}
default_type text/plain;
}