How To Setup Virtual Hosts (Real Domain) Using XAMPP

what i want to do is to use my new domain that i am developing on localhost but in the default wayย  http://localhost/website but using normal

The Steps

You need to have XAMPP installed ( ๐Ÿ˜ )
Open up the Xampp control panel and stop Apache (Ensure that you donโ€™t have it running as a service โ€ฆ this is where doing so complicates things)
Navigate to C:/xampp/apache/conf/extra or wherever you installed xampp
Fire up your text editor with administrative privileges and open up httpd-vhosts.conf found in the C:/xampp/apache/conf/extra folder
At the very bottom of the file paste the following

<VirtualHost *:80>
 ServerAdmin localhost
 DocumentRoot "F:\xampp\htdocs"
 ServerName localhost
 ErrorLog "logs/"
 CustomLog "logs/" common



With out that line of code you will lose access to your default htdocs directory. IE. http://localhost/ will be inaccessible.

Now copy and paste the code below .. below the first code

 <VirtualHost *:80>
 DocumentRoot "F:\xampp\htdocs\limor"
 ErrorLog "logs/"
 CustomLog "logs/" common


Now we head over to our Windows Hosts File, to edit the HOSTS. the file will be located at C:/Windows/System32/drivers/etc/hosts, where hosts is the file. localhost

look for the line above, and enter your site mimicking the layout localhost

change it to reflect the lines above (if you have problems saving it meant you didnโ€™t have your text editor running in admin mode.

Restart Apache and test to make sure it is working

If you have any problems comment if not โ€ฆ give it a like