Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
174 views
in Technique[技术] by (71.8m points)

apache - Amazon EC2 How Do I Host a PDF File on my Instance?

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) 
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

user848118 answered his/her own question: URLs are case sensitive.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...