This happend due to default port 80 is blocked for Apache. You need to change the port or make the port accesible.
Go to your Apache configuration (httpd.conf) file in the Apache installation.
Find these lines:
#
Listen 192.168.1.2:80
Listen 80
#
Here 192.168.1.2 is my private IP address. Change it according to yours.
Change as below
Listen 192.168.1.2:8081
Listen 8081
Now when you access localhost you have to add the port explicitily as http://localhost:8081/...