简体   繁体   English

XAMPP + mod_wsgi + python Windows 7

[英]XAMPP + mod_wsgi + python Windows 7

i'm trying to install django on a local test server [i know python+django has one] and i've already set up xampp hosting: 我正在尝试在本地测试服务器上安装django [我知道python + django有一个]我已经设置了xampp主机:

Apache 2.4, Python 2.7, mod_wsgi (compiled from source: https://code.google.com/p/modwsgi/wiki/InstallationOnWindows and using win32-ap22py27.mk, idk if the make file I used is okay since there are no errors upon starting apache and apache says it loads the wsgi module as well as my python) Apache 2.4,Python 2.7,mod_wsgi(从源代码编译: https//code.google.com/p/modwsgi/wiki/InstallationOnWindows并使用win32-ap22py27.mk,idk如果我使用的make文件没问题,因为没有启动apache和apache时的错误说它加载了wsgi模块以及我的python)

XAMPP

wsgi.conf [that is included in httpd.conf]: wsgi.conf [包含在httpd.conf中]:

WSGIScriptAlias /wsgi "C:/xampp/htdocs/wsgi/scripts/test.wsgi"
AddHandler wsgi-script .wsgi

<Directory "C:/xampp/htdocs/wsgi/scripts">
    Order deny,allow
    Allow from all
</Directory>

and a generic test.wsgi file: 和一个通用的test.wsgi文件:

def application(env, start_response):
    start_response("200 OK", [])
    output = "<html>Hello World! Request: %s</html>"
    output %= env['PATH_INFO']
    return [output]

My problem is that I get an aborted connection on testing a wsgi app: **http://localhost/wsgi** 我的问题是我在测试wsgi app时出现中断连接: **http://localhost/wsgi**

i've searched the internets and no luck 我搜索了互联网,没有运气

okay there must be something wrong with the make file and so therfore module here if anyone interested(bookmark this thing): 好吧,make文件一定有问题,所以如果有人感兴趣的话,那么这里的模块(书签这个东西):

http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi

using apache2.4 and python2.7 compatible mod_wsgi3.4 and now it works... 使用apache2.4和python2.7兼容mod_wsgi3.4,现在它可以工作......

This topic is useful for Windows 10, xampp webserver as well.
I was struggling to find precompiled mod_wsgi.so for 
Apache/2.4.27 (Win32) 
Python/2.7.13 
This [link][1] is useful to find the appropriate version of mod_wsgi.
IF you are lucky, you can find the precompiled version [here][1]
There is a step by step guidance available [here][1]

    enter code here

  [1]: https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst
  [2]: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
  [3]: https://everything2.com/title/Installing+Python+on+XAMPP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM