Nginx初体验 &http-server

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

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

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  /;
        # }
}

猜你喜欢

转载自www.cnblogs.com/FHell/p/10760840.html