1. Go to C:\Windows\system32\drivers\etc folder and add this line to the hosts file
127.0.0.1 thesite.lcom
2. Go to C:\xampp\apache\conf\extra\ and add this to the file httpd-vhosts.conf
NameVirtualHost * <VirtualHost *> DocumentRoot "C:\xampp\htdocs" ServerName localhost </VirtualHost> <VirtualHost *> DocumentRoot "C:\Documents\sites\shop" ServerName thesite.lcom <Directory "C:\Documents\sites\shop"> Require all granted </Directory> </VirtualHost>
DocumentRoot - path to the local site folder ServerName - the local server custom name (from the hosts file) Require all granted - grant access to the site through the local server
3. Restart the Apache server
4. Type the URL in a browser
thesite.lcom