1、 Deploying Django to remote Linux server
Using xshell to connect to Linux server through SSH, the normal startup command is
python3 manage.py runserver 0.0.0.0:80
However, after you close xshell, you won’t be able to access Django
Concept: if you are running a process and you feel that the process will not end when you exit the account, you can use the nohup command. This command can continue to run the corresponding process after you exit the account/close the terminal.)
Enter
nohup python3 manage.py runserver 0.0.0.0:80
An error will be reported
nohup: ignoring input and appending output to ‘nohup.out’
2、 Solutions
1. Why
Because using nohup will generate log files, which are written to nohup.out by default
2. Solution
Output the log of nohup to/dev/null, this directory will make all the information to it disappear automatically
nohup python3 manage.py runserver 0.0.0.0:80 > /dev/null 2> /dev/null &
Similar Posts:
- Django exception-ImportError: No module named django.core.management
- How to Solve Error: [Errno 11001] getaddrinfo failed
- ImportError: Couldn’t import Django [How to Solve]
- [Solved] You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for…
- [Solved] Django Error: – no such table: main.auth_user__old
- Error modulenotfounderror when starting Django: no module named ‘pytz’
- [Solved] Django cannot create an app after creating a project
- Docker Django: underlying buffer has been detached [How to Solve]
- Django Use logging Module Cannot Operate the File Error: logging error Permission Error [WinError 32]
- Python2.7 Error: command not found: django-admin.py [How to Solve]