我只是按照此页面的说明进行操作(http ://www.alexkorn.com/blog/2011/03/getting-php-mysql-running-amazon-ec2/)在 ec2 实例上设置 apache 和 mysql。我无法让他们的自定义文件结构指向我的文件,因此我将结构更改为 /var/www/html 并更改了 http.conf 文件的底部以显示此更改。当我这样做时,我在服务器上获得了一个 Amazon Linux AMI 测试页测试页面,但是当我尝试测试 /index.html 或 /index.php 时,我收到文件未找到错误 - 即使我创建了 /var /www/html 目录并将这两个文件放在那里 - 我可能做错了什么?
页面位置:http://ec2-107-20-234-28 .compute-1.amazonaws.com/
I just followed the instructions from this page (http://www.alexkorn.com/blog/2011/03/getting-php-mysql-running-amazon-ec2/) to setup apache and mysql on an ec2 instance. I couldn't get their custom file structure to point to my files, so I changed the structure to /var/www/html and change changed the bottom of the http.conf file to show this change. When I do that, I get an Amazon Linux AMI Test Page test page on the server, but when I try to test /index.html or /index.php, I get a file not found error - even though I created the /var/www/html directories and placed both files there - what can I be doing wrong?
Page location: http://ec2-107-20-234-28.compute-1.amazonaws.com/
发布评论
评论(1)
它基于 Linux 操作系统以及 Apache 的设置方式,根据您的陈述,您似乎已经配置了
类似于下面的内容(如果我错了,请纠正我):然后,你重新启动了 Apache(?-确认),如果这是正确的,那么我相信你会看到你想要的。
更新:
如果您使用 Debian/Ubuntu,请不要介意查看以下 URL 来配置用于 Web 开发的操作系统:http://rakesh.sankar-b.com/2010/09/10/install-setup-debian-os-server-machine/
It based on the Linux OS and how Apache has been setup, as per your statement, it looks you have configured the
<VirutalHost>
something similar to below (correct me if I am wrong):Then, you restarted Apache (? - confirm), if this is correct, then I am sure you see what you want.
Update:
If you are using Debian/Ubuntu don't mind looking at the following URL for configuring an OS for web-development: http://rakesh.sankar-b.com/2010/09/10/install-setup-debian-os-server-machine/