亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: django 學(xué)習(xí)記錄(apache配置) [打印本頁(yè)]

作者: jack_sir    時(shí)間: 2011-12-20 09:48
標(biāo)題: django 學(xué)習(xí)記錄(apache配置)

Django on Apache using mod_python
  
Install Ubuntu-Server

sudo apt-get install libapache2-mod-python python-django python-django-doc
sudo vim /etc/apache2/sites-available/django-example
 

<Location "/mysite">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonDebug On
    PythonPath "['/home/jack'] + sys.path"
</Location>

Alias /media /usr/share/pyshared/django/contrib/admin/media/

<Location "/media/">
    SetHandler None
</Location>

<LocationMatch "\.(jpg|gif|png)$">
    SetHandler None
</LocationMatch>

 

sudo a2dissite default
sudo a2ensite django-example
sudo /etc/init.d/apache2 reload


Django 1.3 apache 配置文件:


<VirtualHost *:80>
ServerName www.qibar.com
<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE qibar.settings
    PythonDebug On
    PythonPath "['/home/zhaozhigang'] + sys.path"
</Location>

Alias /static /home/zhaozhigang/static

<Location "/static/">
    SetHandler None
</Location>

<LocationMatch "\.(jpg|gif|png)$">
    SetHandler None
</LocationMatch>

</VirtualHost>
 





歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2