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.

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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ