0

i could not find a clear answer on how to access my own localhost for development environment to test http services. So far i have tried doing http://localhost:8080/Folder/this.php and it goes www.localhost.com ??? i have checked that the access port is 80 in config file.

here is a code fragment that i wanted to implement on

function TMSSvc($http,$rootScope){
    this.loadBlogs= function(){
        $http.get("http://localhost:8080/webService/getBlogs.php").success(function(result){
              $rootScope.$broadcast("TMSApp.blogs",result);
          });
    }
}

Can you help me? I am a beginner in this . Thank You

Wang'l Pakhrin
  • 858
  • 3
  • 15
  • 29
  • tell your computer that the word localhost should point to 127.0.0.1 by editing the hosts file on your computer. Just add the line `127.0.0.1 localhost` then you should be able to type `localhost` in the address bar and it will direct to the localhost IP where xampp has control – iam-decoder Nov 11 '15 at 04:33
  • @Wang'l Pakhin : check your virtual host setting. – Jigar7521 Oct 17 '16 at 08:30

1 Answers1

1

If you are on Windows you need to go to the file:

C:\Windows\System32\drivers\etc\hosts

If you are on Linux or Mac:

/etc/hosts (i.e. sudo nano /etc/hosts)

Then uncomment the line:

#   127.0.0.1       localhost

So it reads:

    127.0.0.1       localhost

You should then be able to access your local server using localhost.

Maltronic
  • 1,782
  • 10
  • 21