Creating A WordPess Virtual Domain Under Apache
The location Apache´s httpd.conf file is normally at
C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
NOTE: This is assuming that Apache was installed in C:\Program Files on your local computer.
Open httpd.conf file in any text (i.e. ASCII) editor of your choice.
Locate the code block contained within
<Directory "C:/Program File/Apache Software Foundation/Apache2.2/htdocs"> </Directory> enties as shown in Diagram 1.
Select this code block. Copy and Paste this code block immediately below the original.
NOTE: Please ensure that both
<Directory . . . .> and the </Directory>tags exist.
Change <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" > </Directory>.
<Directory "D:/public_html/wordpress"> as shown in Diagram 2
NOTE: Please note the use of the forward slash above.
These entries within Apache´s httpd.conf file ensure that Apache knows that D:\public_html\wordpress exists and that directory permissions are set.
Once Apache knows the existence and location of D:\public_html\wordpress appropriate entries in the httpd-vhost.conf must be made.
httpd-vhost.conf is normally located at
C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.conf
Open the above conf file in any other text (i.e. ASCII) editor of your choice.
Copy the <VistualHost *.80 > block of code and paste it immmediately below the original code block
Make the following changes as shown in Diagram 4
ServerAdmin: <Email Id>
DocumentRoot: <Path where your virtual domain is located>
ServerName: <Name of the website>
ErrorLog: <Folder where all Apache errors logs will be stored>
CustomLog: <Comment the CustomLog>
After making all the above entries in both httpd.conf and httpd-vhost.conf
Please Restart Apache Web Server
NOTE: The Apache Web Server icon is normally visible in the status bar of the Window.
Look at the extreme right hand side of the status bar.
If Apache Web Server does not restart please check all the entries made in the httpd.conf and httpd-vhost.conf files.
NOTE: Look especially carefully for spelling mistakes.
Making entries in Windows HOSTS file
Now its time to make entries in Windows HOSTS file as shown in Diagram 5
The HOSTS file contains mappings of IP addresses to host names.
There must be a single IP address / host name pair on a single line in the HOSTS file.
NOTE: The IP address and the Host name must be separated by a TAB.
The HOSTS file is normally located at C:\WINDOWS\system32\drivers\etc\hosts