亚马逊EC2我如何主机上我的实例PDF文件? [英] Amazon EC2 How Do I Host a PDF File on my Instance?
问题描述
我使用本指南: <一href="http://codingthis.com/platforms/linux/how-to-host-simple-content-with-amazon-elastic-cloud-computing-ec2/" rel="nofollow">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.
这篇关于亚马逊EC2我如何主机上我的实例PDF文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!