반응형

Python과 Django

장고는 파이썬용 오픈소스 웹 개발 프레임워크로 웹 개발을 간단하고 쉽게 만든느 것이 목적이다. 장고는 동적 관리 인터페이스, 캐시 프레임워크, 단위 테스트 같은 특징을 포함하고 있다. 장고서버와 nginx를 uWSGI로 연동합니다.

 

uWSGI

uWSGI 모듈은 nginx와 애플리케이션이 uwsgi 프로토콜로 통신하게 해준다. uwsgi 프로토콜은 WSGI(Web Server Gateway Interface)에서 파생됐습니다.

 

SCGI

SCGI는 Simple Common Gateway Interface의 약자로 CGI 프로토콜의 변종이며 FastCGI와 유사하다. SCGI 인터페이스와 모듈은 Apache, IIS, Java, Cherokee등 다양한 소프트웨어 프로젝트에서 발견할 수 있습니다.

 

Python과 Django 설치 및 설정

  • yum install python3 python3-devel
  • yum install python3-pip
  • pip3 install django~=2.2.0
  • pip3 install uwsgi
  • django-admin startproject test_project
  • cd test_project/
  • uwsgi --socket :9000 -p 5 --module test_project.wsgi &
  • ps aux | grep uwsgi

참고

uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html

 

반응형

+ Recent posts