I'm learning Magento 2 and can see that Magento has two
index.php files. One is in the root folder and another one is in Pub folder. While reading many of the posts regarding webroot of Magento, I can see that we have to set the webroot to Pub folder for security.
Currently, I have installed the Magento in Xampp.
Can anyone please tell me how to set the webroot to Pub in Magento 2?