Home WebServer PanelDirectAdmin Allow showing the list of files in the website directory on DirectAdmin

Allow showing the list of files in the website directory on DirectAdmin

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

In this article, AZDIGI will show you how to display files in the website directory so that your visitors can view or download these files directly.

I. Overview

By default, the system will not display the files of any folder of the website. And when you try to access it, you will get a blank page or with a 403 (Access is not allowed) message as shown below:

Screen Shot 2020 11 08 at 10.02.26 PM

So how do we able to display all the files?

Screen Shot 2020 11 08 at 10.04.14 PM

Please refer to the following steps.

II. Enable displaying files in the website folder

I’m using DirectAdmin Apache, so in this tutorial, I will work on the DirectAdmin interface. In case you use other control panels such as cPanel, aaPanel, FASTPANEL, CyberPanel, it is almost the same.

If you are using an Openlitespeed webserver, please refer to the following tutorial for Openlitespeed to read and understand the .htaccess file.

Nginx doesn’t support this file.

To enable the display of files in the website directory, we perform the following 3 steps.

Step 1: Access your DirectAdmin

To access DirectAdmin, you need to access the link http://IP:2222 on your browser.

Below is my DirectAdmin interface:

Screen Shot 2020 11 08 at 10.18.22 PM

After entering the DirectAdmin interface, we go to step 2 to enable the display of files in the website directory with the .htaccess file.

Step 2: Enable displaying files in the website folder with htaccess

Go toSystem Info & Files > File Manager.

Here, depending on the folder where you want to share files, you move there. I have a folder on my website called tai-xuong and I will go to that folder.

Screen Shot 2020 11 08 at 10.27.19 PM

Note: In this directory, you absolutely must not have an index file like index.php, index.html… available. Because if so, please rename this file to a different name.

Here I don’t have any index files. And I will need to create a new file named .htaccess, the reason this file has a dot in front is that this is a hidden file.

How to create a file is as follows.

Screen Shot 2020 11 08 at 10.48.19 PM

And name the .htaccess file.

Screen Shot 2020 11 08 at 10.52.54 PM

After you have created a file named .htaccess, you need to right-click on this file and select Edit as shown below.

Screen Shot 2020 11 08 at 10.54.28 PM

On the content editing page, you can add the following content and save it.

AZDIGI Tutorial
Options +Indexes
    

Let’s review the results before and after.

Before enabling the display of files in the website directory.
Before enabling the display of files in the website directory.
After enabling the display of files in the website directory.
After enabling the display of files in the website directory.

So we have succeeded in displaying the file in the website directory.

III. Summary

So AZDIGI has completed the steps to display files in the website directory. However, you should only show folders with unimportant data.

Hope this article will be of help to you. Wishing you success!

See more useful articles about DirectAdmin at the following link:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign