如何在亚马逊 EC2 上调试 python 网站? [英] How can I debug python web site on amazon EC2?

查看:24
本文介绍了如何在亚马逊 EC2 上调试 python 网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Web 开发的新手.这可能是一个愚蠢的问题,但我找不到可以帮助我的确切答案或教程.我工作的公司的网站(用 python django 构建)托管在亚马逊 EC2 上.我想知道我可以从哪里开始调试这个生产站点并检查存储在那里的日志和数据库.我有帐户信息,但无论如何我可以使用命令行(如 ubuntu shell)或相同的教程访问所有内容吗?

I am new to web development. This is probably a dumb question but I could not quite find exact answer or tutorial that could help me. The company I am working at has its site(which is built in python django )hosted on amazon EC2. I want to know where I can start about debugging this production site and check logs and databases that are stored there. I have the account information but is there anyway I can access all the stuff using command line(like an ubuntu shell) or tutorial for the same ?

推荐答案

您只需要找出您的代码在服务器上的位置.SSH 连接到其中一个实例,然后您可以使用 python 交互式 shell 运行 django 代码进行调试,使用 manage.py 命令进行数据库调试、测试等.

You just need to find out where your code is located on the server. SSH to one of the instances and then you can use the python interactive shell to run your django code for debugging, use the manage.py commands for database debugging, tests etc.

一旦您连接到实例,它就只是一个操作系统.

Once you have connected to the instance, it's just an OS.

这篇关于如何在亚马逊 EC2 上调试 python 网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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