What should I do to keep my website server on even though my computer is off?

0

I clicked 'connect using SSH' button and after that, I typed python manage.py runserver 0:8000. I expected the website to be accessible all the time when I just type that once, but if I don't keep my computer on and press refresh button every 30 seconds, I can't access the site. I should type same sentences every time to keep my site accessible. What should I do to keep my website server on even though my computer is off? I'm a student and not a professional so I'm expecting kind and easy answers. Thank you.

已提问 2 年前242 查看次数
1 回答
2
已接受的回答

The easiest way would be to use nohup

nohup python manage.py runserver 0:8000 &

You can verify that it's indeed working by exiting the SSH session and connecting back again. Then verify with ps command that it is yet running

ps ax | grep python

--Syd

profile picture
Syd
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则