[python] mod_fastcgi, mod_wsgi - dsindex/blog GitHub Wiki

  • HOWTO Use Python in the web

  • mod_fastcgi

    • Apache, FastCGI and Python
      • WebOP, middleware
      • mod_fastcgi가 하는 일은 위 URL에서 나오는 그림을 보면 이해할 수 있다 그림1
      • 'Listen on socket','Read request from socket','Response'는 전부 User script의 영역이다.
        • 즉, import fcgi를 이용해 처리. 이때 여러가지 편의기능을 제공하는 WebOP과 같은 middelware를 사용할 수 있다. 물론 import cgi를 사용해서 직접 작성하는 것도 가능하다. 아래 그림에 잘 설명되어 있다. 그림2
        • fcgi.WSGIServer(app, bindAddress = '/tmp/fcgi.sock').run()이 코드는 WSGI spec을 지원하는 서버를 구동하는 것인데, 여기서도 알 수 있듯이 WSCGI는 spec일 뿐이다.
        • 'import fcgi' 사용법
  • mod_wsgi