github-pages - GitHub Pages/GitCafe Pages 可以搭建博客,并且可以绑定域名,技术原理是什么呢?如何实现的呢?
漂亮男人
漂亮男人 2017-04-28 09:04:07
0
3
755

GitHub Pages/GitCafe Pages 可以搭建博客,并且可以绑定域名,技术原理是什么呢?如何实现的呢?

1.每个账户都可以搭建一个静态网站
2.每个账户都可以绑定一个域名
3.但是可以只有一个IP地址
求解。。。。。感谢万分!

漂亮男人
漂亮男人

reply all(3)
Ty80

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!