zoukankan      html  css  js  c++  java
  • CentOS安装wsgi

    第一步:编译安装 wsgi
    1.wget https://modwsgi.googlecode.com/files/mod_wsgi-3.4.tar.gz
    2.tar zxvf mod_wsgi-3.4.tar.gz
    3. ./configure --with-apxs=/usr/sbin/apxs
    4.make
    5.make install
    6.make clean
    7.make distclean

    第二步:设置路基
    wsgi 设置
    import sys
    #sys.path.append('/var/www/html/gdnsplus_conf/')

    path = '/usr/local/gdnsplus_conf/www'
    if path not in sys.path:
    sys.path.append(path)


    import os

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")


    第三步:HTTP的设置
    httpd设置
    ErrorLog /usr/local/gdnsplus_conf/var/log/httpd_err.log
    CustomLog /usr/local/gdnsplus_conf/var/log/httpd_cust.log combined

    LoadModule wsgi_module modules/mod_wsgi.so
    WSGIScriptAlias / /var/www/html/gdnsplus_conf/wsgi.py
    #WSGIPythonPath /var/www/html/gdnsplus_conf

    <Directory /var/www/html/gdnsplus_conf>
    #<Files wsgi.py>
    Order deny,allow
    Allow from all
    #</Files>
    </Directory>

  • 相关阅读:
    Java学习心得16
    Java学习心得15
    Java学习心得14
    Java学习心得13
    Java学习心得12
    Java学习心得11
    Java学习心得10
    Java学习心得09
    Java学习心得08
    JVM垃圾回收
  • 原文地址:https://www.cnblogs.com/lxgeek/p/3071516.html
Copyright © 2011-2022 走看看