Nginx+webpy Configuration

Source: Internet
Author: User

Before the app to learn the Webpy, has been used with the webserver, recently studied nginx for some time, decided to play a combination of the two ~

The main points of the building, perhaps one day will have to use-in fact, usually hands are very lazy ...

1 required modules and background knowledge

pcre,flup,nginx,webpy,spawn-fcgi

Pcre is the premise of Nginx installation, after installing Pcre Configur Enginx with--with-pcre=path,path as pcre source path (not the installation path OH).

FASTCGI, the communication specification, specifies the way of communication, the Protocol; WSGI is an interface specification that defines function definitions, calls, and is equivalent to a set of Python APIs that provide support for fastcgi (and other) protocols.

spawn-fcgi, fastcgi process Manager, originally a lighttpd submodule, LIGHTTPD is also an HTTP server similar to Nginx, acting equivalent to the FASTCGI module in other HTTP servers , but it achieves better, in some cases the performance will be relatively high, so they are separated out widely used, so independent out as a project. So there are apache+spawn-fcgi, nginx+spawn-fcgi and so on.

Flup, a Python-written web server, the so-called Server/gateway in CGI, is responsible for accepting LIGHTTPD forwarded requests and invoking the program you wrote (application), and return the results of application processing to APACHE/LIGHTTPD.

web.py, it should be said that with the above things you can start to write your Web program, but the problem is that you have to handle the browser input and output, as well as cookies, sessions, templates and other various problems, Web.py's role is to help you do all this work, it is called the web framework, another famous is Django, but the feeling is too complex, web.py almost enough (currently web.py support for the session is not too good).

Their relationship is as follows,

  

2 configuration process

See References 2 and 3.

Reference:

1 nginx Configuration Daquan Chinese http://my.oschina.net/duxuefeng/blog/34880

2 WEBPY Official Configuration recommendations HTTP://WEBPY.ORG/COOKBOOK/FASTCGI-NGINX.ZH-CN

31 Examples of Chinese configuration http://blog.csdn.net/five3/article/details/7732832

4 spawn-fcgi Source http://chenzhenianqing.cn/articles/936.html

Nginx+webpy Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.