본문 바로가기
python

uwsgi 자동 시작 설정 [우분투]

by dev-hyunhyun 2024. 12. 26.

서버 리부팅 시의 자동 시작 설정 방법입니다.

 

sudo vim /etc/systemd/system/uwsgi.service


[Unit]
Description=uWSGI Emperor Service
After=network.target

[Service]
ExecStart=/home/ubuntu/venv/bin/uwsgi --ini /etc/uwsgi/sites/djangoProject.ini [여기만 바꿔주세요]
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target



sudo systemctl daemon-reload
sudo systemctl enable uwsgi.service
sudo systemctl start uwsgi.service

[테스트]
sudo reboot
sudo systemctl status uwsgi.service

 

 

 

 

 

'python' 카테고리의 다른 글

gunicorn 구니콘 유니콘 관련  (0) 2025.06.19
django - settings.py 기본 보안 설정  (0) 2025.02.25
구글 네이버 sso 로그인 django 설정 정보  (2) 2024.11.20
기본 django 세팅  (0) 2024.08.27
uWSGI 관련  (0) 2024.08.23