3

I would like to preface this with the fact that I'm a serious beginner with things Devops and I'm certain that this is a simple problem, I just can't find a good place to really dive into this stuff.

Basically I have a demo up and running on an AWS EC2 instance that is generally working. The way I currently run it is by having a security group that allows http requests on port 80 and then running this at startup:

python -m SimpleHTTPServer 80

Which works, and makes things generally servable, but for some reason this will randomly break and the site will go down. Also I would like to have my computer removed from the cycle of things since I feel that if I have to keep my computer on it kind of defeats the purpose of running this on a server.

How exactly do I go about this, I'm not sure if the occasional black spots are related to this issue, but any advice would be greatly appreciated.

secretmike
  • 9,814
  • 3
  • 33
  • 38
Slater Victoroff
  • 21,376
  • 21
  • 85
  • 144

1 Answers1

1

SimpleHTTPServer just serves static pages on port 80, mainly for use during development.

For production usage (if you want to use EC2) I recommend you read up on Apache or nginx. Basically you want a web server that runs on Linux.

If you think your site will remain static files (HTML, CSS, JS) I recommend you host them on Amazon S3 instead. S3 is cheaper and way more reliable. Take a look at this answer for instructions: Static hosting on Amazon S3 - DNS Configuration

Enjoy!

Community
  • 1
  • 1
secretmike
  • 9,814
  • 3
  • 33
  • 38