debian apache django
2014-08-18 16:24 boyjump 阅读(161) 评论(0) 收藏 举报1 安装apache2:apt-get install apache2 apt-get install apache2-dev
2 安装mod_wsgi:pip install mod_wsgi
3 修改apache配置文件 类似:
<VirtualHost *:80> ServerName wsgi.mytest DocumentRoot /home/sarlmolapple/workspace/django-site/mytest <Directory /home/sarlmolapple/workspace/django-site/mytest> Order allow,deny Allow from all </Directory> WSGIScriptAlias / /home/sarlmolapple/workspace/django-site/mytest/wsgi.py</VirtualHost>4 修改wsgi.py
import osimport syssys.path.append('/home/sarlmolapple/workspace/django-site')sys.path.append('/home/sarlmolapple/workspace/django-site/mytest')注意:
sqlite3访问 要更改 数据库所在文件夹 和数据库文件的属性
chown www-data folder
chown www-data folder/db.sqlite3
浙公网安备 33010602011771号