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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠