I had to change my default apache port number 80 to 8123 (just random number)
I changed the following files ..
httpd.conf
Listen 8123
ServerName localhost:8123
httpd-vhosts.conf
NameVirtualHost *:8123
<VirtualHost *:8123>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
DirectoryIndex index.php
</VirtualHost>
Windows Hosts file
127.0.0.1:8123 localhost
::1:8123 localhost
I am using Windows 7.
After making all these changes, I restarted apache but I am still unable to access http://localhost
.... however http://localhost:8123
works fine ... can someone help me find what I am doing wrong here? thanks
hosts
file does not makse sense. Thehosts
file is to create a relation between an ip address and one or more host names. The first entry in ahosts
file has to be an ip address only! The follwing entries shall be host names. – alk Oct 31 '12 at 10:27