Localhost VS Server

  • amer_80
  • Born
  • Born
  • amer_80
  • Posts: 1

Post 3+ Months Ago

We have just recently installed our new server (Windows 2008), we have downloaded wamp and use Firefox as our main Browser and everything is running perfectly.

The problem:

to access the phpmyadmin if we type:

Code: [ Select ]
http://server/phpmyadmin/ (Does not work)
http://localhost/phpmyadmin/ (Works)
  1. http://server/phpmyadmin/ (Does not work)
  2. http://localhost/phpmyadmin/ (Works)


to access the localhost if we type:

Code: [ Select ]
http://server/ (Works)
http://localhost/ (Does not work)
  1. http://server/ (Works)
  2. http://localhost/ (Does not work)


Why this is happening?

Thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Did you ever figure out a reason for why this is happening? When you say it does not work, does it time out? or does it give you some sort of numerical error such as a 404 error?

My first guess is that since server and localhost can be configured as different domains with the same IP address, it is possible that your server is setup to use phpmyadmin with the "localhost" domain, and there is nothing else on the "localhost" domain in Apache configured at the doc root. Then on your other "server" domain it might be possible that it is setup in Apache to point to a directory that has pages, but phpmyadmin is not configured as an alias of some sorts under that domain in the Apache configuration file which is why it will not work when using that domain.

Not sure if that makes any sense, but even though server and localhost both are pointing to the same computer (most likely), that doesn't mean they will serve the same identical things. Just like with virtual webhosting on the internet, many hosts can use one single ip address for all of their customers websites as each domain is set to use that IP, but Apache can distinguish the differences in the domain names. When someone visits a website the browser sets the "Host" header, and then Apache looks at this header field to determine what to do next as far as what part of the configuration it should be using and where the doc root is, aliases, and many other things that can change between domains. So when you goto localhost or server, a different host header would be sent from the browser and my guess is that you have them setup different in Apache.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.