在虚拟专用服务器上设置网站

时间:2022-12-05 07:39:52

I've got my website files on a VPS as of right now, I can access the website using the IP of my VPS, but despite my multiple attempts I can't successfully point my domain to my VPS. I've created a DNS through my registrar to point to the VPS IP, once I link it to my domain, accessing the domain results in a connection timeout. I've also tried using the free DNS services provided by no-ip, same issue. Could this be an issue with my domain services? It's very irritating, does anyone have any suggestions?

我现在已经在VPS上获得了我的网站文件,我可以使用我的VPS的IP访问该网站,但尽管我多次尝试,但我无法成功将我的域名指向我的VPS。我通过我的注册商创建了一个DNS来指向VPS IP,一旦我将其链接到我的域,访问域会导致连接超时。我也尝试过使用no-ip提供的免费DNS服务,同样的问题。这可能是我的域名服务的问题吗?这是非常恼人的,有没有人有任何建议?

1 个解决方案

#1


1  

First, you might want to check that your DNS is actually setup correctly. From a different computer, use nslookup to do a DNS lookup like so:

首先,您可能想要检查您的DNS是否已正确设置。在另一台计算机上,使用nslookup进行DNS查找,如下所示:

nslookup hostname.domain.tld

Does it return the correct address for your VPS? If so, that's a good sign - the FQDN that you are using for your site is resolving correctly.

它是否为您的VPS返回正确的地址?如果是这样,这是一个好兆头 - 您正在为您的网站使用的FQDN正确解析。

If the DNS is resolving correctly, then the next step to troubleshoot would be to see if your web server is responding to HTTP requests, by using telnet to attempt a connection to your web server on port 80. The following blog has a good write-up about how to do this: http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet

如果DNS正确解析,则排除故障的下一步是查看您的Web服务器是否响应HTTP请求,使用telnet尝试连接到端口80上的Web服务器。以下博客写得很好关于如何做到这一点:http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet

Once you've isolated the problem to either a DNS issue or a webserver issue, you can troubleshoot further. If you post your results to these tests here, someone here will be able to suggest the next steps.

将问题隔离到DNS问题或网络服务器问题后,您可以进一步排查问题。如果您在此处将结果发布到这些测试中,则此处的某人将能够建议后续步骤。

#1


1  

First, you might want to check that your DNS is actually setup correctly. From a different computer, use nslookup to do a DNS lookup like so:

首先,您可能想要检查您的DNS是否已正确设置。在另一台计算机上,使用nslookup进行DNS查找,如下所示:

nslookup hostname.domain.tld

Does it return the correct address for your VPS? If so, that's a good sign - the FQDN that you are using for your site is resolving correctly.

它是否为您的VPS返回正确的地址?如果是这样,这是一个好兆头 - 您正在为您的网站使用的FQDN正确解析。

If the DNS is resolving correctly, then the next step to troubleshoot would be to see if your web server is responding to HTTP requests, by using telnet to attempt a connection to your web server on port 80. The following blog has a good write-up about how to do this: http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet

如果DNS正确解析,则排除故障的下一步是查看您的Web服务器是否响应HTTP请求,使用telnet尝试连接到端口80上的Web服务器。以下博客写得很好关于如何做到这一点:http://blog.tonycode.com/tech-stuff/http-notes/making-http-requests-via-telnet

Once you've isolated the problem to either a DNS issue or a webserver issue, you can troubleshoot further. If you post your results to these tests here, someone here will be able to suggest the next steps.

将问题隔离到DNS问题或网络服务器问题后,您可以进一步排查问题。如果您在此处将结果发布到这些测试中,则此处的某人将能够建议后续步骤。