In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to enable Nginx directory browsing function" related knowledge, Xiaobian through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to enable Nginx directory browsing function" article can help you solve the problem.
We all know that when you can configure a path to access the web server under apache, the list of files under its directory is automatically displayed. In fact, nginx is no weaker than apache. Of course, it can also achieve this function, and it is also very easy and simple. It is mainly enabled by the parameter autoindex, and its configuration is as follows:
The copy code is as follows:
Location / {
Root / data/www/file / / specify the absolute path of the actual directory
Autoindex on; / / enable directory browsing function
Autoindex_exact_size off; / / turn off detailed file size statistics, and let the file size display mb,gb units. Default is b
Autoindex_localtime on; / / enable to display the file modification date in the server's local time zone!
}
After the configuration above, access the root directory of the server with ie, and a list of all the files in the / data/www/file directory will be displayed. The nginx directory browsing effect image will be displayed:
In order to remember, finally, record the configuration method under apache! The effect is the same as above!
The copy code is as follows:
Alias / "/ data/www/file"
< directory "/data/www/file" >Options indexes / / enable directory list index mode
Order allow,deny
Indexoptions namewidth = 25 charset = utf-8 / / sets the display length of the file name, text character encoding
Allow from all
This is the end of the introduction to "how to enable Nginx directory browsing". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.