Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ 127.0.0.1 and localhost difference     - Composition and dynamic memory allocation C program (Programming)

- A key installation Gitlab 7 on RHEL6.4 and Setup Mail TX (Linux)

- How to find an IP address through the command line (Linux)

- IDS Intrusion Detection System built (Linux) (Linux)

- After installing minimize RHEL / CentOS 7 we need to do (Linux)

- Debian Stable (Jessie 8.1) of normal.mod not found (Linux)

- Linux_Logo - output color ANSI Linux distributions logo command-line tool (Linux)

- Caffe install under Ubuntu 14.04 64bit (Linux)

- Compile Android libwebcore.so error occurs when solving (Programming)

- Analysis of native Java keywords (Programming)

- KVM installation under CentOS 5.5 (Linux)

- Command-line based tools for better alternatives (Linux)

- Observation network performance tools for Linux (Linux)

- About Linux operating system security (Linux)

- MySQL configuration file my.cnf increase the log file parameter error (Database)

- Linux non-graphical interface to install Oracle Database (Database)

- ORA-04091 and Compound Trigger (Oracle 11g) (Database)

- How to use nmap command in Linux (Linux)

- Android main thread message system (Handler Looper) (Linux)

- Cygwin install Python MySQLdb (Linux)

 
         
  127.0.0.1 and localhost difference
     
  Add Date : 2018-11-21      
         
         
         
  Today opened a new server, the code diversion of the past, even the database connection is not on, I looked at the original configuration from 127.0.0.1 to localhost on it. Consider the following two differences.

A lot of people will be exposed to this ip address 127.0.0.1. You might ask what is the address 127.0.0.1? In fact, 127.0.0.1 is a loopback address, referring to the local machine, usually used for testing. We used to run ping 127.0.0.1 local ip / tcp is not normal, as can ping can be used normally.

For most it is the practice of using localhost, in essence, is a pointer to the local IP address 127.0.0.1. There is a configuration file with 127.0.0.1 localhost bound together in the operating system. It can be understood as meaning the local host.

What is the difference between localhost and 127.0.0.1?

Some would say that I believe is the local ip, it has been said, with more than localhost 127.0.0.1, and can reduce the time to resolve.

It seems that people do not know there is a problem, in fact, the two are different.

localhost also called local, correct explanation is: the local server

127.0.0.1 in the correct interpretation of windows and other systems are: the local address (local server)

They parse through the machine's host file, windows will automatically resolves to 127.0.0.1 localhost

localhot (local) is not transmitted through the network card! This is important, it is not the network firewall and LAN-related restrictions.

127.0.0.1 is transmitted through the card, depending on the card, and are subject to network firewalls and network card related restrictions.

General Setup When the local service is the best use localhost, localhost will not resolve to ip, it will not take up network card, network resources.

Sometimes you can use localhost, but you can use 127.0.0.1 is not the case in this. Guess localhost access, the system with a native of the current user permission to access and use the ip when the machine is again equal access to the machine via the network, the network may be related to the user's permissions.
     
         
         
         
  More:      
 
- Ubuntu terminal command - see the port occupied and off (Linux)
- Atheros AR8161 / AR8162 network card driver problem solving in CentOS 6.4 (Linux)
- CentOS7 install MySQL5.6.22 (Linux)
- Linux system package manager (rpm, yum, source packages installation) (Linux)
- Elementary OS Freya global menu (Linux)
- Shell for loop (Programming)
- PyCharm new Python file name and the name of the module will import the same problem might arise (Programming)
- Acting on JavaScript events (Programming)
- Reason C ++ program running under Linux a segmentation fault core dumped in (Programming)
- Tmux Crash Course: Tips and adjustment (Linux)
- Docker deployment practices in Ubuntu (Server)
- Increase Linux system security --chattr (Linux)
- Use the DBMS_SCHEDULER package to manage scheduled tasks (Database)
- OpenvSwitch 2.1.2 shell script to start and stop (Linux)
- Getting Started with Linux system to learn: how to install the kernel headers on Linux (Linux)
- Python decorators to learn and practice the actual usage scenarios (Programming)
- Linux awk text analysis tool (Linux)
- Oracle to create an external table (Database)
- How to install Perl modules from CPAN (Linux)
- Linux system security settings (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.