user1556202
user1556202

Reputation: 3

How do I publicly host a file on my Amazon EC2 instance?

Though similar to Amazon EC2 How Do I Host a PDF File on my Instance? this is not a simple case of case sensitivity.

I currently have the file I'd like to be publicly available in /var/www/html which is the DocumentRoot (though note we've also got amazon EBS set up) but nonetheless going to ourinstance/file.pdf gives 404 not found.

I'd like to avoid having to use S3.

Upvotes: 0

Views: 295

Answers (1)

Nasir
Nasir

Reputation: 2984

You need to setup a web server (apache/nginx) and configure it to serve the file (from a domain). In order to do that, you need to setup a virtual host (or its equivalent in nginx).

Once done, you start the server and assuming DNS settings are correctly setup, your file should be served.

I think this question is better suited to be asked on serverfault rather than stackoverflow.

Upvotes: 1

Related Questions