http-server命令的作用是以所在路径为根目录创建一个本地服务器

Nginx反向代理,通过修改配置文件(nginx.conf)中的访问路径访问http-server根目录,开启目录文件列表显示功能

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
http {
    #开启文件目录列表显示功能     autoindex on;
    autoindex_exact_size off;
    autoindex_localtime on;     #gzip on;
    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   E:/test1/;
            # index  index.html index.htm;
        }

        # location /http-s {
        #     root   /;
        #     index  /;
        # }
}

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄