Python Configuration Wsgi interface
#introducing the Python WSGI package fromWsgiref.simple_serverImportMake_server#Compose server-side program codedefApplication (Envirn,start_response): Start_response ('OK',[('Content-type','text/html')]) return '<b>hello world</b>'#instantiate a server that listens on port 8080Server = Make_server ("', 8080, application)#start listening for HTTP requestsServer.serve_forever ()
WSGI is a generic protocol that links Python server-side programs to Web servers
NGINX+UWSGI Configuration
Installing Nginx
Brew Install Nginx Brew Services start Nginx
Nginx configuration file
Go to the/usr/local/etc/nginx directory and execute sudo vim nginx.conf
Reference: http://www.cnblogs.com/Lxiaolong/p/4201973.html
Installation Uwsgi and Configuration
Pip Install Uwsgi
Reference: http://www.cnblogs.com/sky20081816/p/3398864.html
Python Web Server