孤独是一种态度
ubuntu django+apache2
1、django下载:
http://www.djangoproject.com/download/
# tar xzvf Django-1.3.tar.gz
# cd Django-1.3
# sudo python setup.py install
2、安装apache
# sudo apt-get install apache2
# sudo apt-get install libapache2-mod-python python-sqlite
3、创建程序目录
# cd /var/www
# django-amdin startproject www
4、修改配置文件
# cd /etc/apache2/sites-available/
# cp default www
# a2ensite www
# vi /etc/apache2/httpd.conf
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE www.settings
PythonPath “['/var/www'] + sys.path”
PythonDebug On
# /etc/init.d/apache2 restart
5、测试
http://127.0.0.1/www/
原创文章,转载请注明: 转载自gjw_apparitor 博客
本文链接地址: ubuntu django+apache2
| 打印文章 | 这篇文章由gjw_apparitor于2011 年 09 月 05 日 上午 7:34发表在Django。你可以订阅RSS 2.0 也可以发表评论或引用到你的网站。 |
大约5月前
Greetings! Quite useful assistance on this short article! It really is the tiny adjustments that make the most important alterations. Many thanks a good deal for sharing!