Just as you are confused, for a web server, there is only one IP address. How to return different content for different domain names?
In fact, it is very simple. The Web Server looks at the Host in the Request and finds the corresponding folder. It can even reverse proxy the request to other servers based on the Host. Many web servers have this feature. Keywords: domain name reverse proxy
This is a function that comes with the web server. It is recommended to learn the relevant knowledge first. Coding Pages also supports binding custom domain names.
Generally, the bound domain name is pointed to the URL of a service provider through CNAME. The header information in the past Request is used as a parameter to distinguish different users to query the user's information. When you bind a domain name, there will be an operation to submit the domain name, and they will save your domain name.
If it is a domestic situation, domestic servers require domain name registration before they can perform resolution. The service provider may force only registered domain names to be bound, or may ask you to resolve the URL pointing to a foreign server and then do a reverse proxy.
You can learn about nginx reverse proxy domain name
Just as you are confused, for a web server, there is only one IP address. How to return different content for different domain names?
In fact, it is very simple. The Web Server looks at the Host in the Request and finds the corresponding folder. It can even reverse proxy the request to other servers based on the Host. Many web servers have this feature. Keywords: domain name reverse proxy
This is a function that comes with the web server. It is recommended to learn the relevant knowledge first. Coding Pages also supports binding custom domain names.
Generally, the bound domain name is pointed to the URL of a service provider through CNAME. The header information in the past Request is used as a parameter to distinguish different users to query the user's information. When you bind a domain name, there will be an operation to submit the domain name, and they will save your domain name.
If it is a domestic situation, domestic servers require domain name registration before they can perform resolution. The service provider may force only registered domain names to be bound, or may ask you to resolve the URL pointing to a foreign server and then do a reverse proxy.
You can learn about nginx reverse proxy domain name