Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Question Add more disk HDD

samugarob

Basic Member
Basic Member
Joined
Jun 11, 2025
Messages
7
Reaction score
3
Points
14
Location
SK
Hello,
I want to ask if anyone can advise how to add another disk to NGINX in Ubuntu 22 so that data is displayed from the second HDD when I enter my site and the path to the file? My second disk is formatted as ext4.
I want to have /var/www/html on the second disk
What do I need to enable everything? I tried various instructions that I found on Google, but nothing helped.
Thank you
 
want to ask if anyone can advise how to add another disk to NGINX in Ubuntu 22 so that data is displayed from the second HDD when I enter my site and the path to the file? My second disk is formatted as ext4.
I want to have /var/www/html on the second disk
What do I need to enable everything? I tried various instructions that I found on Google, but nothing helped.
Thank you

To use your second ext4-formatted HDD as the new location for `/var/www/html` on Ubuntu 22.04 with NGINX, follow these steps:

1. Identify Your Second Disk
Run:
Code:
lsblk
Look for your second disk (e.g., `/dev/sdb1`).

2. Mount the Disk
Create a mount point:
Code:
sudo mkdir -p /mnt/data_disk

Mount the disk:
Code:
sudo mount /dev/sdb1 /mnt/data_disk

Test:
Code:
ls /mnt/data_disk

3. Move Your Web Files
If you already have files in `/var/www/html`, back them up and move them:
Code:
sudo rsync -a /var/www/html/ /mnt/data_disk/

4. Mount the Disk to /var/www/html
Backup current HTML directory:
Code:
sudo mv /var/www/html /var/www/html.bak

Then mount the new disk:
Code:
sudo mount /dev/sdb1 /var/www/html

5. Make It Persistent on Reboot
Edit your `/etc/fstab`:
Code:
sudo nano /etc/fstab

Add this line at the bottom:
Code:
/dev/sdb1  /var/www/html  ext4  defaults  0  2

6. Set Correct Permissions
Make sure NGINX can access the files:
Code:
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html

7. Restart NGINX
Code:
sudo systemctl restart nginx

If it still doesn't work, feel free to share your lsblk, fstab, and permission details so we can help further!
 
To use your second ext4-formatted HDD as the new location for `/var/www/html` on Ubuntu 22.04 with NGINX, follow these steps:

1. Identify Your Second Disk
Run:
Code:
lsblk
Look for your second disk (e.g., `/dev/sdb1`).

2. Mount the Disk
Create a mount point:
Code:
sudo mkdir -p /mnt/data_disk

Mount the disk:
Code:
sudo mount /dev/sdb1 /mnt/data_disk

Test:
Code:
ls /mnt/data_disk

3. Move Your Web Files
If you already have files in `/var/www/html`, back them up and move them:
Code:
sudo rsync -a /var/www/html/ /mnt/data_disk/

4. Mount the Disk to /var/www/html
Backup current HTML directory:
Code:
sudo mv /var/www/html /var/www/html.bak

Then mount the new disk:
Code:
sudo mount /dev/sdb1 /var/www/html

5. Make It Persistent on Reboot
Edit your `/etc/fstab`:
Code:
sudo nano /etc/fstab

Add this line at the bottom:
Code:
/dev/sdb1  /var/www/html  ext4  defaults  0  2

6. Set Correct Permissions
Make sure NGINX can access the files:
Code:
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html

7. Restart NGINX
Code:
sudo systemctl restart nginx

If it still doesn't work, feel free to share your lsblk, fstab, and permission details so we can help further!

I tested today and is worked. Very thank you for help.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top