1. 程式人生 > >nginx配置讓任何文件在瀏覽器中顯示文本text/plain

nginx配置讓任何文件在瀏覽器中顯示文本text/plain

plog oot time gin header 顯示 lai server 博文

例子

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

nginx配置讓任何文件在瀏覽器中顯示文本text/plain