<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post//</link>
<title><![CDATA[在Linux下搭建Django环境]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Python]]></category>
<pubDate>Thu, 22 May 2008 08:15:34 +0000</pubDate> 
<guid>https://blog.liuts.com/post//</guid> 
<description>
<![CDATA[ 
	<strong>下载源码包</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>1.下载httpd-2.0.63.tar.gz<br/><a href="http://apache.mirror.phpchina.com/httpd/httpd-2.0.63.tar.gz" target="_blank">http://apache.mirror.phpchina.com/httpd/httpd-2.0.63.tar.gz</a><br/></div></div><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>2.下载mod_python-3.3.1.tgz<br/><a href="http://apache.mirror.phpchina.com/httpd/modpython/mod_python-3.3.1.tgz" target="_blank">http://apache.mirror.phpchina.com/httpd/modpython/mod_python-3.3.1.tgz</a><br/></div></div><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>3.下载Django-0.95.2.tar.gz<br/><a href="http://www.djangoproject.com/download/0.95.2/tarball/" target="_blank">http://www.djangoproject.com/download/0.95.2/tarball/</a><br/></div></div><br/><strong>开始安装</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>tar -zxvf httpd-2.0.63.tar.gz<br/>cd httpd-2.0.63<br/>./configure --prefix=/usr/local/apache --enable-module=so --enable-so --enable-ssl --with-ssl=/usr/local/openssl --enable-rewrite --with-mpm=prefork<br/>make && make install<br/>tar xzvf Django-0.95.2.tar.gz<br/>cd Django-0.95.2<br/>sudo python setup.py install<br/>tar -zxvf mod_python-3.3.1.tgz<br/>cd mod_python-3.3.1<br/>./configure --with-apxs=/usr/local/apache/bin/apxs<br/>make <br/>sudo make install<br/></div></div><br/><strong>配置</strong><br/><textarea name="code" class="shell" rows="15" cols="100">
cd /home
django-admin.py startproject mysite
vi /usr/local/apache/conf/httpd.conf
LoadModule python_module modules/mod_python.so
NameVirtualHost *
<VirtualHost *>
&nbsp;&nbsp;&nbsp;&nbsp;SetHandler python-program
&nbsp;&nbsp;&nbsp;&nbsp;PythonHandler django.core.handlers.modpython
&nbsp;&nbsp;&nbsp;&nbsp;SetEnv DJANGO_SETTINGS_MODULE mysite.settings
&nbsp;&nbsp;&nbsp;&nbsp;PythonPath "['/home/'] + sys.path"
&nbsp;&nbsp;&nbsp;&nbsp;PythonDebug On
</VirtualHost>
<LocationMatch "&#92;.(jpg&#124;gif&#124;png)$">
&nbsp;&nbsp;&nbsp;&nbsp;SetHandler None
</LocationMatch>

prefork MPM
MaxRequestsPerChild 0
修改成：
MaxRequestsPerChild 1
修改setting.py
TEMPLATE_DIRS成员用绝对地址;
</textarea><br/>Tags - <a href="https://blog.liuts.com/tags/django%25E7%258E%25AF%25E5%25A2%2583/" rel="tag">django环境</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post//#blogcomment</link>
<title><![CDATA[[评论] 在Linux下搭建Django环境]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.liuts.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>