yesn 发表于 2017-12-25 11:18:19

mac安装apache的mod

  第一次用pip安装 ,最终不能使用,原因是系统自带的apache,python和新安装的冲突,
  所以需要安装时需要指定apache,python路径
  所以用make makeinstall方式
  参考链接 :
  http://www.iyunv.net/article/76934.htm
  1 下载
mod_wsgi
  进行下载目录
./configure --with-apxs=/Users/levin/dev/apache2.2.27/bin/apxs --with-python=/usr/bin/pythonmakemake install以上路径分别对应本机相应安装路径打开 apache配置文件httpd.conf添加LoadModule wsgi_module modules/mod_wsgi.soWSGIScriptAlias /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
  浏览器里测试localhost/hello.wsgi
页: [1]
查看完整版本: mac安装apache的mod