Nevermind folks, completed the task successfully.
Turns out at /usr/share/nginx/html there exist a file index.html (in red color). At first deletion of this file wasn’t working and the edits made to this file wouldn’t save (gives error E166 can’t open linked file for writing). Therefore, I created index.html elsewhere - in /home/tony/data) and changed the nginx.conf file for root to point to the new location ( root /home/tony/data; ) where index.html was created. — STILL I was getting 403 Forbidden.
Then I followed this article - https://tinyurl.com/y4oqrtag (Safe to open).
Ensured User nginx is owner of all directories in /usr/share/nginx
#sudo chown -R nginx:nginx *
Ensured all directories (my case /html and /modules only) have permissions set to 755
#sudo chmod 755 /html
#sudo chmod 755 /modules
Tried to make sure all files in document root directory (/html) have permission set to 644
#sudo chmod 644 *
Setting 644 yielded error:
chmod: cannot operate on dangling symlink ‘index.html’ – The red file.
But at this stage (after setting directory owner and directory permissions) - using sudo rm index.html I was able to delete the red index.html file I was having trouble deleting initially.
Next I created new index.html with message Welcome! at location /usr/share/nginx/html/index.html using sudo vi /usr/share/nginx/html/index.html. This time it saved successfully.
Also ensured that in the nginx.conf file location for root was updated to original setting - ( root /usr/share/nginx/html; )
Amazing troubleshooting / reviewing article / finding solution / learning experience.
I am new to linux without any formal training or work related experience on linux. Took me 3 hours to solve, but enjoyed it.
Thanks Team KKE @mmumshad for this platform and to all the contributors in the community.