zoukankan      html  css  js  c++  java
  • mac安装apache的mod_wsgi模块

    第一次用pip安装 ,最终不能使用,原因是系统自带的apache,python和新安装的冲突,

    所以需要安装时需要指定apache,python路径

    所以用make makeinstall方式

    参考链接 :

    http://www.jb51.net/article/76934.htm

    1 下载 

    mod_wsgi

    进行下载目录

    ./configure --with-apxs=/Users/levin/dev/apache2.2.27/bin/apxs --with-python=/usr/bin/python
    make
    make install
    以上路径分别对应本机相应安装路径
    打开 apache配置文件httpd.conf
    添加
    LoadModule wsgi_module modules/mod_wsgi.so
    WSGIScriptAlias /hello.wsgi /Applications/XAMPP/xamppfiles/htdocs/hello.wsgi  
    在xampp的htdocs目录下建文件hello.wsgi
    内容:

    #hello.wsgi
    def application(environ, start_response):
    status = "200 OK"
    response_headers = [('Content-type', 'text/plain')]
    output = "hello world!"
    start_response(status, response_headers)
    return [output]

    浏览器里测试localhost/hello.wsgi

  • 相关阅读:
    NSDate 与NSString的互相转换
    NSArray 基础
    IOS 使用自定义字体
    页面跳转添加动画
    Builder 模式
    树的子结构
    Singleton 模式
    合并两个排序的链表(递归算法)
    合并两个排序的链表(非递归)
    反转链表
  • 原文地址:https://www.cnblogs.com/xqnq2007/p/6607735.html
Copyright © 2011-2022 走看看