Ubuntu配置Django和apache+mod_pyth
2013-01-17 11:07
483 查看
一.创建工程
1.进入django/bin目录下
cd /usr/share/pyshare/django/bin
2.python django-admin.py startproject myproject
用find查看: find / -depth -name "myproject"
/usr/share/pyshared/django/bin/myproject
myproject目录结构,
按照不同情况设定不同的参数,修改settings.py文件
3。运行
python manage.py runserver 8080
提示:
Django version 1.3.1, using settings 'myproject.settings'
Development server is running at http://127.0.0.1:8080/
Quit the server with CONTROL-C.
此时用其他机器访问不了,加上ip地址即可
python manage.py runserver 192.168.240.102:8080
提示:
Validating models...
0 errors found
Django version 1.3.1, using settings 'myproject.settings'
Development server is running at http://192.168.240.102:8080/
Quit the server with CONTROL-C.
二.django在apache2下运行
find / -name "*python*.so"
/usr/lib/python2.7/config/libpython2.7.so
/usr/lib/libpyglib-gi-2.0-python2.7.so
http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz
1.进入django/bin目录下
cd /usr/share/pyshare/django/bin
2.python django-admin.py startproject myproject
用find查看: find / -depth -name "myproject"
/usr/share/pyshared/django/bin/myproject
myproject目录结构,
myproject/ __init__.py manage.py settings.py urls.py |
3。运行
python manage.py runserver 8080
提示:
Django version 1.3.1, using settings 'myproject.settings'
Development server is running at http://127.0.0.1:8080/
Quit the server with CONTROL-C.
此时用其他机器访问不了,加上ip地址即可
python manage.py runserver 192.168.240.102:8080
提示:
Validating models...
0 errors found
Django version 1.3.1, using settings 'myproject.settings'
Development server is running at http://192.168.240.102:8080/
Quit the server with CONTROL-C.
二.django在apache2下运行
find / -name "*python*.so"
/usr/lib/python2.7/config/libpython2.7.so
/usr/lib/libpyglib-gi-2.0-python2.7.so
http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz
相关文章推荐
- Python3.5 Django1.8 apache2.4 Ubuntu 配置mod_wsgi模块
- ubuntu下配置django+apache+mysql+mod_python+Python
- Ubuntu+Django+mod_wsgi+Apache配置过程
- ubuntu下配置django+apache+mysql+mod_python+Python
- Ubuntu Apache 2.4 配置-HTTPS、python mod WSGI
- 手把手教你:Ubuntu+django+apache下配置网页错误OperationalError: Unable to Open Database File 的解决方法
- windows2003+apache2.2+python2.7配置django mod_wsgi
- ubuntu下安装apache2.2+mod_wsgi+django(一)
- windows+apache+mod_python配置django运行环境
- Django + Apache + wsgi配置和环境搭建(ubuntu)
- ubuntu 安装、配置django mod_python apache2 mysql
- Django + Apache + wsgi配置和环境搭建(ubuntu)
- Ubuntu Apache配置及开启mod_rewrite模块
- 通过mod_python配置运行在Apache上的Django框架
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- Ubuntu14.04 Server amd64 配置 Apache+MySQL+Django
- mac配置 Django 1.7.1 +mod_wsgi 4.4.7(非daemon) +Apache/2.2.26 (Unix)
- ubuntu下安装apache2.2+mod_wsgi+django(二)
- ubuntu下安装apache2.2+mod_wsgi+django(一)