Drupal 9

Go to the root directory of Drupal 9 site and change the write permission of the .htaccess file to write enable.
sudo chmod 777 .htaccess
 

Open .htaccess with nano command
sudo nano .htaccess
 

Check first for sample output of this Image Gallery.

Requirements

  • Core Modules: Image, Block, Views
  • Contributed Module: Colorbox

Create a Drupal site directory. For this setup, websites are at /var/www/
cd /var/www
mkdir example.com