AWS部署停机频繁 [英] AWS deployment goes down frequently

查看:190
本文介绍了AWS部署停机频繁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我已经有了一个非常基本的部署在一个EC2实例,除了几个大的问题主要是工作。现在,我只是ssh'ing入禁区和运行

So, I've got a very basic deployment on an EC2 instance that largely works, except for a couple of large issues. Right now I'm just ssh'ing into the box and running

python -m SimpleHTTPServer 80

和我有一个安全组,允许HTTP请求在端口80上的框。

and I have the box on a security group that allows http requests in on Port 80.

这似乎工作,但如果我不要管它了一段时间(1-2小时通常是)我的弹性IP将开始返回404错误。我真的需要这台服务器熬夜的演示给第三方。如何任何想法,以确保它保持了?

This seems to work, but if I leave it alone for a while (1-2 hours usually) my elastic ip will start returning 404s. I really need this server to stay up for demos to third parties. Any ideas on how to make sure it stays up?

此外它的股价下跌,当我关闭多数民众赞成以SSH方式登录我的盒子,这是非常不理想的,因为我想这个演示熬夜,即使我的电脑是关闭的终端。这是一个不太紧急的事情,但任何意见也将是AP preciated。

Additionally it goes down when I close the terminal that's ssh'd into my box, which is extremely non-ideal as I would like this demo to stay up even if my computer is off. That's a less urgent matter, but any advice on that would also be appreciated.

推荐答案

SimpleHTTPServer 只是服务于80端口静态页面,主要用于在开发过程中使用。

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

有关生产使用(如果你想使用EC2),我建议你阅读关于阿帕奇 Nginx的。基本上你想在Linux上运行的Web服务器。

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.

如果你认为你的网站将保持静态文件(HTML,CSS,JS),我建议你举办他们在Amazon S3代替。 S3更便宜,方式更加可靠。看看这个答案说明:<一href="http://stackoverflow.com/questions/8312162/static-hosting-on-amazon-s3-dns-configuration/8357318#8357318">Static托管在Amazon S3 - DNS配置

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

享受!

这篇关于AWS部署停机频繁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆