站长

Django-Vue-Admin-Pro常见错误

本地测试的时候静态文件404错误

如果您最近在设置文件中将调试更改为 false。遵循此程序。

大多数情况下是由settings.py中的调试设置为false引起的。如果您将 --insecure 开关传递给 runserver 它应该可以工作。因此,如果您确实python manage.py runserver 0.0.0.0:8000将其更改为python manage.py runserver 0.0.0.0:8000 --insecure

它应该工作。

LNMP相关配置文件位置
Nginx主配置(默认虚拟主机)文件:/usr/local/nginx/conf/nginx.conf

/etc/supervisor/conf.d

pipenv run gunicorn application.wsgi -w 2 -k gthread -b 0.0.0.0:8000

/etc/supervisor/conf.d

[program:application]
command= /home/wwwroot//env/bin/gunicorn application.wsgi -w 2 -k gthread -b 0.0.0.0:8000
directory=/home/wwwroot//backend
autostart=true
autorestart=unexpected
user=root

[supervisord

服务段启动

supervisord -c /etc/supervisord.conf

常用命令介绍

supervisorctl 是 supervisord的命令行客户端工具

  1. supervisorctl status:  查看所有进程的状态
  2. supervisorctl stop es:停止es
  3. supervisorctl start es:启动es
  4. supervisorctl restart es: 重启es
  5. supervisorctl update : 配置文件修改后可以使用该命令加载新的配置
  6. supervisorctl reload:     重新启动配置中的所有程序
  7. ...

把 es 换成 all 可以管理配置中的所有进程

update dvadmin_kehu set update_datetime='2022-03-06 13:49:42.866506'

Django-Vue-Admin-Pro常见错误已关闭评论