zoukankan      html  css  js  c++  java
  • Nginx如何隐藏index.html

    我要隐藏目录下的index.html,修改Nginux配置如下:

    1.修改文档顺序

    index  index.html index.php

    2.开启目录流量

    在server或location 段里添加上autoindex on;来启用目录流量


    a.直接二级目录开启目录流量

    location /down/ {
    autoindex on;
    }

    b.整个虚拟主机开启目录流量

    在server段添加

    location / {
    autoindex on;
    autoindex_localtime on; #之类的参数写这里
    }

    c.虚拟目录开启目录流量

    location /down/ {
    alias /home/wwwroot/lnmp/test/;
    autoindex on;
    }

  • 相关阅读:
    hdoj:2075
    hdoj:2072
    hdoj:2071
    hdoj:2070
    hdoj:2069
    test001
    hdoj:2067
    hdoj:2061
    hdoj:2058
    hdoj:2057
  • 原文地址:https://www.cnblogs.com/feng18/p/5586532.html
Copyright © 2011-2022 走看看