我使用本指南: http://codingthis.com/platforms/linux/how-to-host-simple-content-with-amazon-elastic-cloud-computing-ec2/
我在我的/ home / EC2用户与index.html文件目录命名的文件夹的public_html。
我迄今所做的:
须藤的yum -y安装httpd的PHP
须藤的chkconfig httpd的上
行chmod 755 /家用/ EC2用户(我不知道这样做的)
sudo的纳米/etc/httpd/conf/httpd.conf中
(改变的DocumentRoot的DocumentRoot /家庭/ EC2用户/的public_html)
现在,当我去我的www.mywebsite.com它会打我的index.html文件。我试图把一个pdf文件在我的public_html目录,我试图去www.mywebsite.com/pdffile.pdf和它说找不到网页。我如何承载我的pdf文件在我的EC2实例?
EXTRA:
我已经启用了安全组对我的情况与规则:
ICMP允许所有
TCP允许所有
UDP允许所有
TCP端口80(HTTP)
解决方案
假设你的机器的IP是myipaddress 把PDF文件在/ var / www和浏览
http://myipaddress.com/file.pdf
我的作品。
I am using this guide: http://codingthis.com/platforms/linux/how-to-host-simple-content-with-amazon-elastic-cloud-computing-ec2/
I have a folder named public_html in my /home/ec2-user directory with a index.html file.
What I have done so far:
sudo yum -y install httpd php
sudo chkconfig httpd on
chmod 755 /home/ec2-user (I HAVE NO IDEA WHAT THIS DOES)
sudo nano /etc/httpd/conf/httpd.conf
(changed DocumentRoot to DocumentRoot /home/ec2-user/public_html)
Now when I go to my www.mywebsite.com it will hit my index.html file. I tried to put a pdf file in my public_html directory, I tried to go to www.mywebsite.com/pdffile.pdf and it says page not found. How do I host my pdf file on my ec2 instance?
EXTRA:
I have a security group enabled for my instance with rules:
ICMP Allow ALL
TCP Allow ALL
UDP Allow ALL
TCP port 80 (Http)
解决方案
Suppose your machine's IP is myipaddress Put the PDF file in /var/www and browse
http://myipaddress.com/file.pdf
Works for me.
上一篇:如何CloudFront的适用于动态应用在EC2 PHP?适用于、用在、动态、CloudFront
下一篇:如何避免" HTTP / 1.1 999请求被拒绝"从LinkedIn回应?被拒、HTTP、QUOT、LinkedIn