Home > Backend Development > PHP Tutorial > nginx, apache enable file directory browsing function

nginx, apache enable file directory browsing function

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-28 08:29:17
Original
1525 people have browsed it

We all know that when accessing a certain path of the web server under apache, it can automatically display the file list under the directory. In fact, Nginx is not weaker than apache at all. Of course, it can also achieve this function, and it is very easy and simple. ;Mainly use the autoindex parameter to enable it, and its configuration is as follows:

Copy the code The code is as follows:

location / {
                                                                                                                                                                                                                           ​autoindex on ; ; Turn on displaying file modification dates in the server's local time zone!
}


After the above configuration, use IE to access the root directory of the server, and a list of all files in the /data/www/file directory will be displayed. Nginx directory browsing renderings:


For the sake of memorization, finally record the configuration method under apache! The effect is the same as above! ​​​​//Enable directory list index mode Order allow,deny
 nginx,apache开启文件目录浏览功能
          IndexOptions   NameWidth = 25   Charset = UTF -8     //Set the file name display length, text character encoding        

                        out out out out out off off off off off out off out out out out out out together out out outole out out out out out out out out out out ote to s t-- --- s t s t t s t t s t t s t t s t t s t t t; article/48239.htm

The above has introduced the file directory browsing function of nginx and apache, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template