Sometimes, the exciting part in configuring a virtual software server (web or application) is the activity to understand how it works and how can you manipulate it the way you want.
For this post, I would like to give a basic how to on relocating (or pointing) your apache to scan a specific directory as its DocRoot directory. :)
The DocRoot directory – Every PHP developer must ‘ve known or ask regarding about this.
Did you ever wonder if you can customise your XAMPP/LAMP or MAMP to detect or interpret PHP files on a folder other than the docroot folder? Here is how!
Locate httpd.conf file on the apache folder – This is where you can edit that settings!
1st) Go to the DocRoot line and change the location to your location
2nd) and Edit the directory <location> with your location then
Easy easy easy right? Now you can put all your PHP apps there and run it smoothly by using: http://localhost <or whatever your host name is>:80 <or whatever your port is>/app <or whatever your app name is>
|Reference:||Basics of all Basics – Relocate your Apache DocRoot from our WCG partner Alvin Reyes at the Alvin “Jay” Reyes Blog blog.|