码迷,mamicode.com
首页 > 编程语言 > 详细

Python django中apache配置mod_wsgi

时间:2021-07-02 16:07:29      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:sgi   server   module   stat   nbsp   rip   ipython   home   group   

Python3.5

LoadFile "c:/python35/python35.dll"
LoadModule wsgi_module "c:/python35/lib/site-packages/mod_wsgi/server/mod_wsgi.cp35-win_amd64.pyd"
WSGIPythonHome "c:/python35"


#设置工程中的wsgi路径
WSGIScriptAlias / D:/django-apache/demo/demo/wsgi.py
#设置工程路径
WSGIPythonPath "D:/django-apache/demo"
#设置wsgi路径
<Directory D:/django-apache/demo/demo>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
#设置静态文件路径
Alias /media/ D:/django-apache/demo/static/
<Directory D:/django-apache/demo/static>
Require all granted
</Directory>

#设置静态文件路径
Alias /static/ D:/django-apache/demo/static/
<Directory D:/django-apache/demo/static>
Require all granted
</Directory>

WSGIApplicationGroup %{GLOBAL}

 

Python3.7

LoadFile "C:/Python37/python37.dll"
LoadModule wsgi_module "D:/django-apache/venv3/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIPythonHome "D:/django-apache/venv3"


#设置工程中的wsgi路径
WSGIScriptAlias / D:/django-apache/demo/demo/wsgi.py
#设置工程路径
WSGIPythonPath "D:/django-apache/demo"
#设置wsgi路径
<Directory D:/django-apache/demo/demo>
  <Files wsgi.py>
    Require all granted
  </Files>
</Directory>
#设置静态文件路径
Alias /media/ D:/django-apache/demo/static/
<Directory D:/django-apache/demo/static>   
  Require all granted  
</Directory>

#设置静态文件路径
Alias /static/ D:/django-apache/demo/static/
<Directory D:/django-apache/demo/static>   
  Require all granted  
</Directory>

WSGIApplicationGroup %{GLOBAL}

 

Python django中apache配置mod_wsgi

标签:sgi   server   module   stat   nbsp   rip   ipython   home   group   

原文地址:https://www.cnblogs.com/ramsey/p/14962119.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!