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 年前檢視次數 246 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南