简体   繁体   English

如何通过域名访问在VPS主机上安装的Wamp服务器?

[英]How to make a Wamp server installed on VPS hosting accessible by a domain name?

I have a VPS hosted server with Windows Server 2003 on which I installed WAMP server, it is working and I am able to access it by localhost and modify it's contents with no problems. 我有一个装有Windows Server 2003的VPS托管服务器,该服务器上安装了WAMP服务器,该服务器正在运行,并且可以通过localhost访问它,并且可以毫无问题地修改它的内容。 Also I have a domain name, say "domain-name.com". 我也有一个域名,例如“ domain-name.com”。 My question is how can I make it accessible on the internet by typing my owned domain name in browser? 我的问题是如何通过在浏览器中输入我自己的域名来使它可以在互联网上访问?

This is quite an open question, but here goes: 这是一个悬而未决的问题,但这里有:

You'll have to set a DNS record that points to your server. 您必须设置一个指向服务器的DNS记录。 Your domain registrar may offer a DNS services themselves. 您的域名注册商可能会自己提供DNS服务。 If they do not, and only allow you to set nameservers, have a look at http://dns.he.net (a free DNS hosting service). 如果没有,并且仅允许您设置名称服务器,请访问http://dns.he.net (免费的DNS托管服务)。 In the latter case, don't forget to configure the nameservers in your domain registrars panel to the HE DNS servers (ns1.he.net - ns5.he.net)! 在后一种情况下,不要忘记在域注册器面板中将名称服务器配置为HE DNS服务器(ns1.he.net-ns5.he.net)!

The records you will have to add are as follows: 您将必须添加的记录如下:

  • An A record for www.domain-name.com, pointing to your IP www.domain-name.com的A记录,指向您的IP
  • A CNAME record for domain-name.com (often represented in a DNS panel as @), pointing to www.domain-name.com domain-name.com的CNAME记录(通常在DNS面板中表示为@),指向www.domain-name.com
  • Optionally, MX and SPF/TXT records if you wish to use e-mail services on your domain/server (this is a whole separate subject to deal with, especially SPF records can be tricky) 如果您希望在域/服务器上使用电子邮件服务,则可以选择MX和SPF / TXT记录(这是一个完全独立的主题,尤其是SPF记录可能很棘手)

Additionally, while this is not part of the question - please don't use WAMP for public/production servers. 此外,虽然这不是问题的一部分- 请不要将WAMP用于公共/生产服务器。 WAMP was made for development server setups, and it will be configured as such. WAMP是为开发服务器设置而设计的,因此将进行配置。 If you really can't set up a HTTPd+PHP+MySQL setup yourself, then at least have a look at XAMPP, which is more suitable for live servers. 如果您真的不能自己设置HTTPd + PHP + MySQL设置,那么至少看看XAMPP,它更适合于实时服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM