PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 28, 2022

[FIXED] Localhost and 127.0.0.1 show different content in web browser

 February 28, 2022     apache, lamp, localhost, php, ubuntu     No comments   

Issue

When I enter 127.0.0.1 to web browser, it shows page /var/www/index.php as I expected, but when I enter localhost it shows "a simple hello world" html page which I cannot find in the computer.

I used find, grep and other similar tools, but no luck.

Can you please tell me why localhost shows another content then 127.0.0.1 in the web browser?

I have installed apache, mysql and php on my ubuntu 14.04 and Document Root is set to /var/www/. There were previously installed apache, postgresql and php (which I removed), maybe should I check some old exist config files?

/etc/hosts is set to

127.0.0.1    localhost

Solution

I only needed to press F5 button in order to refresh the localhost page in my web browser.

Now the content is the same.



Answered By - Barnyk
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing