<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>GameXG &#187; python</title> <atom:link href="http://www.chenwang.net/category/python/feed/" rel="self" type="application/rss+xml" /><link>http://www.chenwang.net</link> <description>乱七八招</description> <lastBuildDate>Mon, 20 Feb 2012 04:22:27 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>debian 下安装 nginx + uWSGI</title><link>http://www.chenwang.net/2011/03/23/debian-%e4%b8%8b%e5%ae%89%e8%a3%85-nginx-uwsgi/</link> <comments>http://www.chenwang.net/2011/03/23/debian-%e4%b8%8b%e5%ae%89%e8%a3%85-nginx-uwsgi/#comments</comments> <pubDate>Wed, 23 Mar 2011 05:46:23 +0000</pubDate> <dc:creator>GameXG</dc:creator> <category><![CDATA[Django]]></category> <category><![CDATA[nginx]]></category> <category><![CDATA[python]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[uWSGI]]></category><guid isPermaLink="false">http://www.chenwang.net/?p=301</guid> <description><![CDATA[编译安装 nginx sudo aptitude install gcc g++ libpcre3-dev libssl-dev wget http://nginx.org/download/nginx-0.8.54.tar.gz tar xzvf nginx-0.8.54.tar.gz cd nginx-0.8.54/ ./configure \ &#8211;prefix=/home/gamexg/web \ &#8211;sbin-path=/home/gamexg/web/sbin/nginx \ &#8211;conf-path=/home/gamexg/web/etc/nginx/nginx.conf \ &#8211;error-log-path=/home/gamexg/web/var/log/nginx/error.log \ &#8211;pid-path=/home/gamexg/web/var/run/nginx/nginx.pid \ &#8211;lock-path=/home/gamexg/web/var/lock/nginx.lock \ &#8211;user=nginx \ &#8211;group=nginx \ &#8211;with-http_gzip_static_module \ &#8211;http-log-path=/home/gamexg/web/var/log/nginx/access.log \ &#8211;http-client-body-temp-path=/home/gamexg/web/var/tmp/nginx/client/ \ &#8211;http-proxy-temp-path=/home/gamexg/web/var/tmp/nginx/proxy/ \ &#8211;http-fastcgi-temp-path=/home/gamexg/web/var/tmp/nginx/fcgi/ make &#038;&#038; make install 配置nginx 增加一段记录 location /site1 { uwsgi_pass 127.0.0.1:9000; include [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;"><tr><td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td></tr><tr><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;"> <a target="_blank" title="Windows 下 Nginx + PHP5 的安装与配置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.chenwang.net%2F2009%2F10%2F25%2Fwindows-%25E4%25B8%258B-nginx-php5-%25E7%259A%2584%25E5%25AE%2589%25E8%25A3%2585%25E4%25B8%258E%25E9%2585%258D%25E7%25BD%25AE%2F&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/22/2160558.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Windows 下 Nginx + PHP5 的安装与配置</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="Debian 下安装配置virtualbox" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.chenwang.net%2F2007%2F05%2F28%2F6%2F&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/22/2160565.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Debian 下安装配置virtualbox</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="Windows 下以 nginx proxy模式运行 web.py" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.chenwang.net%2F2008%2F10%2F09%2Fwindows-%25E4%25B8%258B%25E4%25BB%25A5-nginx-%25E8%25BF%2590%25E8%25A1%258C-webpy%2F&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/22/2160521.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Windows 下以 nginx proxy模式运行 web.py</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="Windows 下以 nginx + fastcgi 运行 Django 或 web.py" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.chenwang.net%2F2008%2F10%2F09%2Fwindows-%25E4%25B8%258B%25E4%25BB%25A5-nginx-fastcgi-%25E8%25BF%2590%25E8%25A1%258C-django%2F&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/22/2160529.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Windows 下以 nginx + fastcgi 运行 Django 或 web.py</font> </a></td></tr> <br/><tr><td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">来自无觅网络的相关文章：</font></b></td></tr><tr><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;"> <a target="_blank" title="Fedora 17 正式版即将发布 倒计时 =========-&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.edward-han.com%2F276.html&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Fedora 17 正式版即将发布 倒计时 =========-&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (@edward-han)</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="nginx代理unicorn代替thin server" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fanylinux.info%2F%3Fp%3D155&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">nginx代理unicorn代替thin server (@anylinux)</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="安装MoinMoin WiKi教程" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fbio.rusaer.com%2Farchives%2F186&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/06/27/14629960.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">安装MoinMoin WiKi教程 (@rusaer)</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="nginx日志自动下载到本地" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fanylinux.info%2F%3Fp%3D202&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">nginx日志自动下载到本地 (@anylinux)</font> </a></td></tr><tr><td colspan="4" align="right"> <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件"> <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font> </a></td></tr></table>]]></description> <content:encoded><![CDATA[<p>编译安装 nginx<br /> sudo aptitude install  gcc g++ libpcre3-dev libssl-dev</p><p>wget http://nginx.org/download/nginx-0.8.54.tar.gz<br /> tar xzvf nginx-0.8.54.tar.gz<br /> cd nginx-0.8.54/<br /> ./configure \<br /> &#8211;prefix=/home/gamexg/web \<br /> &#8211;sbin-path=/home/gamexg/web/sbin/nginx \<br /> &#8211;conf-path=/home/gamexg/web/etc/nginx/nginx.conf \<br /> &#8211;error-log-path=/home/gamexg/web/var/log/nginx/error.log \<br /> &#8211;pid-path=/home/gamexg/web/var/run/nginx/nginx.pid  \<br /> &#8211;lock-path=/home/gamexg/web/var/lock/nginx.lock \<br /> &#8211;user=nginx \<br /> &#8211;group=nginx \<br /> &#8211;with-http_gzip_static_module \<br /> &#8211;http-log-path=/home/gamexg/web/var/log/nginx/access.log \<br /> &#8211;http-client-body-temp-path=/home/gamexg/web/var/tmp/nginx/client/ \<br /> &#8211;http-proxy-temp-path=/home/gamexg/web/var/tmp/nginx/proxy/ \<br /> &#8211;http-fastcgi-temp-path=/home/gamexg/web/var/tmp/nginx/fcgi/</p><p>make &#038;&#038; make install</p><p>配置nginx<br /> 增加一段记录<br /> location /site1 {<br /> uwsgi_pass   127.0.0.1:9000;<br /> include     uwsgi_params;<br /> }</p><p>编译安装 uWSGI</p><p>sudo aptitude install python-dev libxml2-dev<br /> wget http://projects.unbit.it/downloads/uwsgi-0.9.6.8.tar.gz<br /> tar zxfv uwsgi-0.9.6.8.tar.gz<br /> cd uwsgi-0.9.6.8/<br /> make</p><p>配置 django 使用 uWSGI<br /> gamexg@vps1:~/web$ mkdir site<br /> gamexg@vps1:~/web$ cd site<br /> gamexg@vps1:~/web/site$ mkdir site1<br /> gamexg@vps1:~/web/site$ cd site1/<br /> gamexg@vps1:~/web/site/site1$ mkdir  www<br /> gamexg@vps1:~/web/site/site1$ mkdir  www/static<br /> gamexg@vps1:~/web/site/site1$ django-admin startproject site1<br /> gamexg@vps1:~/web/site/site1$ cd site1/<br /> gamexg@vps1:~/web/site/site1/site1$ ./manage.py startapp app1<br /> gamexg@vps1:~/web/site/site1/site1$ vi myapp.py<br /> gamexg@vps1:~/web/site/site1/site1$ cat myapp.py<br /> import os<br /> os.environ['DJANGO_SETTINGS_MODULE'] = &#8216;test1.settings&#8217;<br /> import django.core.handlers.wsgi<br /> application = django.core.handlers.wsgi.WSGIHandler()</p><p>vi uwsgi.xml<br /> <uwsgi><br /> <socket>127.0.0.1:9000</socket><br /> <master>true</master></p> <pidfile>/home/gamexg/web/var/uwsgi.pid</pidfile> <processes>3</processes> <pythonpath>/home/gamexg/web/site/site1/site1</pythonpath> <pythonpath>/home/gamexg/web/site/site1</pythonpath> <module>myapp</module><br /> </uwsgi></p><p>启动<br /> /home/gamexg/web/uwsgi-0.9.6.8/uwsgi -x /home/gamexg/web/site/site1/uwsgi.xml</p><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;"><tr><td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">无觅猜您也喜欢：</font></b></td></tr><tr><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;"> <a target="_blank" title="Windows 下 Nginx + PHP5 的安装与配置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwww.chenwang.net%2F2009%2F10%2F25%2Fwindows-%25E4%25B8%258B-nginx-php5-%25E7%259A%2584%25E5%25AE%2589%25E8%25A3%2585%25E4%25B8%258E%25E9%2585%258D%25E7%25BD%25AE%2F&from=http%3A%2F%2Fwww.chenwang.net%2F2011%2F03%2F23%2Fdebian-%25E4%25B8%258B%25E5%25AE%2589%25E8%25A3%2585-nginx-uwsgi%2F"> <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/22/2160558.jpg" width="96px" height="96px" /><br /> <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Windows 下 Nginx + PHP5 的安装与配置</font> </a></td><td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;"> <a target="_blank" title="Debian 下安装
