例子
server {
listen 81;
root /var/www/applog;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
location / {
}
location ~ .*/188.188.1.*/.*\.log$ {
add_header Content-Type text/plain;
}
}
查看博文:nginx配置让任何文件在浏览器中显示文本text/plain
原文地址:http://blog.51cto.com/linux10000/2348165
时间: 2024-10-18 04:38:55