Nội dung
1. Overview
In this article, AZDIGI will show you how to download the tar.gz file on DirectAdmin.
In the process of using DirectAdmin, you will use the backup or compression feature. However, we cannot download the tar.gz file format; when clicked, the browser will try to read the file but not download it.
Below is an image when we can’t download the tar.gz file but are directed to a confusing page.
2. Allow downloading file tar.gz DirectAdmin
To allow DirectAdmin to download the tar.gz file, follow these 2 steps.
Step 1: SSH into your DirectAdmin system
To allow DirectAdmin to download the tar.gz file, we need to SSH with root privileges first. If you do not know how to SSH into your VPS/Server, you can refer to the following tutorial:
After successfully SSH, we continue with step 2 to edit the file to allow the formats to be downloaded.
Step 2: Edit the file mime.types to allow these types of formats to be downloaded
To edit this file, you can use the command:
vi /etc/mime.types
Then add the following line to this file and save it.
application/gzip gz tgz
To edit, you can do the following:
- Press Shift + G to go to the bottom of the file.
- Press O to add a new line.
- Insert the content and tab out accordingly as shown below.
- Then save it by pressing the ESC button => Press two characters => Press Enter.
Step 3: Restart DirectAdmin to get the new configuration
So we can download the DirectAdmin tar.gz file, You need to restart DirectAdmin to receive the new configuration. The command to restart DirectAdmin with all operating systems is as follows:
echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue.cb /usr/local/directadmin/dataskq d20 --custombuild
After the restart is complete, we try to download the tar.gz file again to see if it can be downloaded.
Here is the picture after I retry:
When clicking on the file name, the file can be downloaded normally like any other file.
Summary
So you know how to allow DirectAdmin tar.gz file download with two easy steps. Instead of downloading via FTP/sFTP, now we have another method through the DirectAdmin interface.
Hope this article will be helpful to you. If you find this article useful, please share it widely.
Wishing you success.
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com