npm install [email protected]
npm install [email protected]
npm install [email protected]
DEBUG = False
ALLOWED_HOSTS = ['*']
LANGUAGE_CODE = 'zh-Hans'
TIME_ZONE = 'Asia/Shanghai'
# MEDIA_URL = '/media/'
# MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# STATICFILES_DIRS = (
# os.path.join(BASE_DIR, '/static/'),
# )
- 安装 Nginx
yum install nginx
2. 安装 uwsgi
pip3 install uwsgi
3. 本地运行django
python3 manage.py runserver 0.0.0.0:8000 --insecure
4. 服务端部署【暂时】
sudo fuser -k 8000/tcp
uwsgi -d --ini uwsgi.ini
nginx -s reload