centos6.3下apache2.4.4+mod_wsgi+django部署记录

apache2.4.4安装

下载apache2.4.4,解压

下载apr-1.4.6.tar.gz,apr-util-1.5.1.tar.gz,解压

把解压后的apr-1.4.6,apr-util-1.5.1移动到httpd-2.4.4/srclib/目录下并改名为apr,apr-util

到httpd-2.4.4/下进行编译

./configure --prefix=/home/liuwei/apache --enable-so --enable-deflate=shared --enable-ssl=shared --enable-expires=shared  --enable-headers=shared --enable-rewrite=shared --enable-static-support  --with-included-apr --with-mpm=prefork
make && make install

mod_wsgi-3.4安装

下载mod_wsgi-3.4,解压,在mod_wsgi-3.4下进行编译

./configure --with-apxs=/home/liuwei/apache/bin/apxs --with-python=.pythonbrew/pythons/Python-2.7.2/bin/python
make && make install
注:python安装时需要要加入  --enable-shared      pythonbrew install –C --enable-shared 2.7.2


httpd.conf配置

加入LoadModulewsgi_module modules/mod_wsgi.so

加入Includeconf/extra/django-wsgi.conf


django-wsgi.conf配置

<VirtualHost *:8080>
    ServerName www.example.com
    ServerAlias example.com
    ServerAdmin webmaster@example.com
    Alias /static/ /application/search/evaluating/static/
    WSGIApplicationGroup %{GLOBAL}
    WSGIScriptAlias / /application/search/evaluating/django.wsgi
    <Directory /application/search/evaluating>
        Require all granted
    </Directory>
</VirtualHost>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值