ec2/apache not able to locate files on public web from /var/www/html folder
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开发者_StackOverflow中文版 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/
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):
<VirtualHost *>
ServerName localhost
DocumentRoot /var/www/html
</VirtualHost>
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/
精彩评论