183   Nginx

Nginx 设置浏览器查看服务器目录,以及直接打开文件



        location /seropen/ {
            root /data/home;
			# 打开目录浏览功能
            autoindex on;
			# 显示文件大小
            autoindex_exact_size off;
			# 显示文件时间
            autoindex_localtime on;
			# 设置文件头部,以便浏览器直接打开文件
            add_header Content-Type "text/plain;charset utf-8;";
            default_type text/plain;
        }




Leave a Reply

Your email address will not be published. Required fields are marked *