Jan 18, 2024

Ubuntu : Web Server Directory Listing

 To enable directory listing for a web server.

1. sudo apt install nginx -y

2. sudo systemctl stop nginx

3. sudo nano /etc/nginx/sites-available/default
    --> #root /var/www/html;
    --> root /mnt/samba;
    --> location / {
            --> autoindex on;

4. sudo apt install cifs-utils -y

5. sudo mkdir /mnt/samba

6. sudo mount -t cifs //[IP Address]/[Folder Name] -o username=[SMB Username] /mnt/samba

7. Type-In the SMB Share Password when prompted.

8. sudo systemctl start nginx


To automatically mount the same smb share :-

9. sudo nano /etc/fstab
    --> //[IP Address]/[Folder Name] /mnt/samba cifs username=[SMB Username],password=[SMB Password] 0 0



!!! HAPPY COMPUTING !!!

No comments:

Post a Comment