将域指向 ec2 amazon centos 中的 wordpress 文件夹

Point domain to wordpress folder in ec2 amazon centos

我的网站托管在 http://52.68.178.242/

我已经从 aws 注册了域名 gabifrc.org 我在 crentos

上使用 httpd24

我在/etc/httpd/conf/httpd.conf 文件中设置了以下配置。 它似乎改变了 DocumentRoot 但 doamin 没有被使用。我怎样才能将它指向doamin。

<VirtualHost *:80>
     ServerAdmin webmaster@example.com
     DocumentRoot /var/www/html/gabifrc
     ServerName www.gabifrc.org
     ServerAlias gabifrc.org
     ErrorLog /var/www/html/gabifrc/error.log
</VirtualHost>

问题出在 aws route s5 上,我在其中分配了带有 ip 的名称服务器,并且工作得很好。

在/etc/httpd/conf/httpd.conf中取消注释NameVirtualHost *:80

重新启动 httpd

在 DNS 中使用实例的 EIP 创建 A 记录。

这应该可以解决您的问题。