Follow the below steps to change apache2 localhost location:
First open up your terminal and go the follwing location using terminal
Once you have navigated to the above mentioned location, will find 2 files in there
Open both files one after other and make the following changes. Replace the location to your new location
To (Insert the location where you want your apacheserver to be redirected)
After making the change, go a step back (back to apache folder)
Or
Now open up apache config file and add the following lines
Add the above lines right below
Now restart apache service with the following command
You are good to go.
Feel free to contact me @
pavankumarpre@gmail.com
+91 701 309 1943