I'VE FOLLOWED THE GUIDE CREATED BY MR. WorldDrknss STEP BY STEP IN CREATING A VIRTUALHOST IN 1.5.1
11. Now create a new directory in C:\ called www
12. Now create another directory in C:\www called anything you want.
13. Now Navigate to C:\xampp\xampp\apache\conf
14. Open httpd.conf in your favorite text editor
15. Scroll down to the very bottom and delete everything starting at #NameVirtualHost *:80
In other words your going to delete the following:
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
# ServerAdmin email@example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
16. Now replace what you have just deleted with:
17. Now remember when I had you create your C:\www and another directory in C:\www now lets say that you made the directory called main so now main is in C:\www\ this is the directory where your going to have your web files in.
18. Now go back to httpd.conf and add the following after the one we just created above
Notice that // or reversed from \\, this is a must for apache to work.
19. Now navigate to C:\WINDOWS\System32\Drivers\etc\
20. Open the file called Host or Hosts
21. you should see where is says 127.0.0.1 localhost now what you want to do is add the following:
127.0.0.1 localhost.main.com this will allow you to access your web files that are in C:\www\main.
22. You can add as many sites as you want just keep adding directories in C:\www and creating a VirtualHost as describe above pointing to the correct directory and giving it a name, then edit you Hosts file to allow you to access the web content in the folder.
23. If your going to go live then you don't need to edit the hosts file, but you will need some type of domain name to use so apache nows where to receive the right web contents.
24. That is the basic to get apache running and for you to begin creating website.
TOGETHER WITH THIS:
Open httpd.conf file scroll down intill you see DocumentRoot "C:/xampp/xampp/htdocs"
below that you will see
Deny from all
you will need to change Deny to Allow so it looks like:
Allow from all
save and exit.
then open httpd-vhosts.conf in path/apache/conf/extra
and create something similar bellow.
HOWEVER, I'VE FOUND OUT THAT WHEN I GET DISCONNECTED FROM THE NET A PROBLEM OCCUR..."SERVER CANNOT BE FOUND"... IS THERE ANYTHING WRONG??? I CAN'T AFFORD TO ALWAYS BE ONLINE... I'M JUST A POOR DIAL-UP PREPAID SUBSCRIBER... IM SO SORRY I'M A PURE BGINNER WHO WOULD JUST WANT TO LEARN THE BASICS OF PHP DEV. THANK YOU...