Basics of all Basics – Relocate your Apache DocRoot


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

Screenshot_1_20_13_9_29_PM

 

2nd) and Edit the <directory “<location>”> with your location then

Screenshot_1_20_13_9_33_PM

 

3rd) restart!

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>

Screenshot_1_20_13_9_35_PM

 

 

One thought on “Basics of all Basics – Relocate your Apache DocRoot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s