Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of setting up directory browsing and Chinese garbled codes in nginx

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to set up directory browsing in nginx and how to solve the problem of Chinese garbled code". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to set up directory browsing and how to solve the problem of Chinese garbled code in nginx.

The entire directory is not allowed to be listed by default under Nginx. If this feature is required

Open the nginx.conf file first and add it to the location server or http section

Autoindex on

It is best to add the other two parameters:

Autoindex_exact_size off

The default is on, which shows the exact size of the file, in bytes.

After changing to off, the approximate size of the file is displayed, in kB or MB or GB

Autoindex_localtime on

The default is off, and the file time displayed is GMT time.

Note: when changed to on, the file time displayed is the server time of the file.

At this point, I believe you have a deeper understanding of "setting up directory browsing in nginx and how to solve the problem of Chinese garbled code". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report