Home » Web Servers » Basics of all Basics – Relocate your Apache DocRoot

About Alvin Reyes

Alvin Reyes

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

Do you want to know how to develop your skillset to become a Web Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. Building web apps with Node.js

2. HTML5 Programming Cookbook

3. CSS Programming Cookbook

4. AngularJS Programming Cookbook

5. jQuery Programming Cookbook

6. Bootstrap Programming Cookbook

 

and many more ....

 

 

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz