且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在托管多个网站的服务器中通过 IP 地址访问网站?

更新时间:2023-12-02 15:09:10

假设服务器有一个公共 ip 地址,并且被设置为服务虚拟主机,你可以这样做:

Assuming that the server has one public ip address, and been set up to serve virtual hosts, you can do that like this:

curl -H "Host: subdomain.domain.com" IPADDRESS

curl -H "Host: subdomain.domain.com" IPADDRESS