简体   繁体   English

指向Amazon Linux AMI测试页而非WP网站的AWS EC2实例

[英]AWS EC2 Instance Pointing to Amazon Linux AMI Test Page Rather than WP Site

I decided to play around with AWS EC2 and set up a Wordpress site on a 64-bit Linux Instance. 我决定使用AWS EC2并在64位Linux实例上设置Wordpress网站。

I have fully set up the instance with LAMP, installed Wordpress and pointed my domain to the server. 我已经使用LAMP完全设置了实例,安装了Wordpress并将我的域指向服务器。 When I try to access the site http://latesttech.tips I get the Amazon Linux AMI Test Page and the only way to access Wordpress is to visit http://latesttech.tips/lttwp . 当我尝试访问站点http://latesttech.tips时,我得到了Amazon Linux AMI测试页,访问Wordpress的唯一方法是访问http://latesttech.tips/lttwp

How can I have the primary domain to point to the "lttwp" directory automatically so this doesn't have to be done via the URL? 如何让主域自动指向“ lttwp”目录,这样就不必通过URL进行操作?

I'm fairly new in the dev world and looked up how to fix, but couldn't find anything. 我在开发人员世界中还很陌生,他查找了解决方法,但找不到任何东西。

Thanks in advance! 提前致谢!

这是由于您的Word Press文件夹不在APACHE DOCUMENT ROOT中。为此,您必须将wp文件夹移至apache文档根目录,这是我找到的解决方案http://geekme.me/2015/10/16/如何到设置- WordPress的,博客上,女将-EC2-创建数据库教程-4 /

You can edit your apache config file to redirect to your lttwp folder. 您可以编辑apache配置文件以重定向到lttwp文件夹。

Usually the configs for apache are in /etc/httpd/conf or /etc/apache2/conf Look for the directory variable. 通常,Apache的配置位于/etc/httpd/conf/etc/apache2/conf查找目录变量。 You will need to edit that path at 2-3 place in the config for it to work. 您需要在配置中的2-3个位置编辑该路径,以使其起作用。 Look for the documentroot and directory variables. 查找documentrootdirectory变量。

You can find more info here : http://httpd.apache.org/docs/2.2/configuring.html 您可以在此处找到更多信息: http : //httpd.apache.org/docs/2.2/configuring.html

Once done, restart the apache server so that it takes new config: sudo service httpd restart 完成后,重新启动apache服务器,使其采用新配置: sudo service httpd restart

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

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